sshd error: Kerberos mechanism library initialization error

好久沒裝 Solaris 9 了,裝好上完 Patch 後,只要使用 ssh 連線就會冒出了這 error

sshd[19238]: [ID 432372 auth.error] Kerberos mechanism library initialization error: Can't open/find Kerberos /etc/krb5/krb5.conf configuration file.


阿我又沒有 enable Kerberos 啊,怎麼老是跳這訊息
找了好一會兒在 Sun 竟然找不到資料,一堆都是在講 Kerberos 沒設定正確 blah blah。終於在咕狗發現了解法
Solaris SSH Fun,快快筆記一下 :p

1. Solaris 9 9/05 sshd and kerberos could this be a BUG
在 /etc/ssh/sshd_config 中加入
GSSAPIAuthentication no
GSSAPIKeyExchange no

GSSAPIStoreDelegatedCredentials no

2. Fixing the bad Solaris ssh patch
在 /etc/ssh/ssh_config 中加入
Host *
GSSAPIKeyExchange no
GSSAPIAuthentication no

Solaris Performance ToolsCD 3.0

不小心看到個新玩意兒....看起來不錯用,去下載來踹踹

Solaris Performance ToolsCD 3.0 available online

The CD covers within 300 MB:

  • dimSTAT v8.1 - collect and analyze performance data

  • Dtrace Tools - Brendan Gregg's collection of Dtrace scripts

  • K9Toolkit - freeware tools written using the KStat library on a Solaris 9

  • sysperfstat - displays utilization and saturation for CPU, memory, disk and network, all on one line.

  • cpuinfo - displays CPU configuration (number, type, clock and strands)

  • meminfo - displays configuration of physical memory and swap devices or files

  • iobar - displays io for disk-devices in a |cpubar|-like fashion

  • iotop - displays |iostat -x| in a |top|-like fashion

  • checkcable - prints the link up status for network interfaces

  • nicstat - prints statistics for the network interfaces such as KBytes/s read and write, Packets/s etc.

VCS installation script 不認識 e1000g 網路卡

Discovering NICs on node1 .................................discovered e1000g0 e1000g1 e1000g2 e1000g3 e1000g4 e1000g5

Enter the NIC for the first private heartbeat link on node1: [b,?] e1000g1
e1000g1 is not a valid NIC name
Enter the NIC for the first private heartbeat link on node1: [b,?] e1000g1
e1000g1 is not a valid NIC name

好吧,只好安裝完在自己手動設定 heartbeat 了
修改 /etc/llttab 自己手動加上
link e1000g1 /dev/e1000g:1 - ether - -


2008.04.15 補
Veritas Cluster Server 5.0+e805061 fix for the e1000g NICs on Solaris
http://support.veritas.com/docs/301904


VCS with Solaris 8 Zone

畢竟 Solaris 8 zone in Solaris 10 (S8MA) 這玩意兒出來的 VCS Zone support 晚,所以目前 VCS 文件中寫到的 zone,並沒有特別說明是哪種 zone。
現在看來,當然指的都是 Solaris 10 native zone

由文件中看來,zone agent 對 local zone 的動作很單純,online 就是 zoneadm boot,offline 就是 zoneadm halt,對 Solaris 8 Zone 的 online/offline 應該沒什麼問題,但是其他要進去 local zone monitor 的 agent 呢?

在安裝 VCS 或建立 Solaris 10 native zone 時
有部份 VRTS 檔案是會自動從 global zone 複製到 native zone 的
就像 pkgadd or patchadd 時,若不加 -G 參數(Global only)
預設是會 apply 到所有的 running native zone
這兒我看來最重要的是那些 VCS agent 了
因為 global/local zone 都是 solaris 10 沒問題
但在 Solaris 8 zone 就有問題了...

check engin_A.log :
2008/01/13 18:56:16 VCS INFO V-16-2-13001 (node-2) Resource(ora8): Output of the completed operation (online) sh: /opt/VRTSvcs/bin/Oracle/online: not found
2008/01/13 19:33:35 VCS INFO V-16-2-13001 (node-2) Resource(ora8): Output of the completed operation (offline) sh: /opt/VRTSvcs/bin/Oracle/offline: not found

為什麼 not found ?原來是去用 local zone 中的 agent 了
因為不是 native zone,所以安裝時(pkgadd)不會複製這些檔案
導致 agent 無法正確的 monitor zone 中的 AP
我的偷吃步就是看有哪些 VRTS 檔案會被安裝到 native zone 中
就照樣複製這些檔案到 Solaris 8 zone 中

還有另一個問題
VCS WARNING V-16-1-52529 Login Incorrect, Invalid username/password
Agnet 在 global/local zone 中怎麼溝通?這兒需要設定一個 cluster user 讓他有 Group Administor 權限就ok了

在 native zone 中沒有這些問題,安裝時都會自動設好
但在 p2v zone 中,我們只好手動來把這些設定做完了

ok! It works !!

參考文件:
Veritas Cluster White Paper
Implementing Solaris™ Zones with Veritas™ Cluster Server
by Symantec
July 2006
Eric Hennessey
Group Technical Product Manager
Unix Clustering Solutions

穿過公司防火牆

我習慣用 TeraTerm,只有在要用 ssh 時才會去開 putty
最近才知道 TeraTerm 終於有 ssh version 2 的版本了~ Happy!
UTF-8 TeraTerm Pro with TTSSH2
設定 ssh tunnel 等等我覺得還算蠻方便的

因為有些東西沒有 GUI 設定起來還真麻煩,只好想法子讓這些工具可以透過 ssh 穿過公司防火牆,來連接內部網路的主機了

公司內部網路 192.168.x.x,防火牆僅讓一台主機的 ssh port 可通過,於是乎只能拿這台當作橋樑了
用 ssh 連上這台主機後,設定 ttssh 的 SSH Forwarding:
Local port 11123 to Remote 192.168.x.111 port 23
Local port 11380 to Remote 192.168.x.113 port 80
Local port 14141 to Remote 192.168.x.115 port 14141
Local port 2148 to Remote 192.168.x.115 port 2148
按下 ok 後馬上生效

可以 telnet localhost 11123,就是連上 192.168.x.111
可以 http://localhost:11380,就是連上http://192.168.x.113
打開 VCS Java Console 連 localhost,就是連上 192.168.x.115 的 VCS GUI
打開 VxVM VEA 連 localhost,就是連上192.168.x.115 的 VxVM GUI 啦

參考文章:
Breaking Firewalls with OpenSSH and PuTTY
好孩子不要學:SSH Reverse Tunnel

2010.4.11 補充
每次都忘記,剛剛踹了好一陣子...總算ok
1.設定 ttssh Port Forwarding
ssh: Local port 12322 to Remote 192.168.x.123 port 22
2. ssh localhost:12322 以 ssh 登入 192.168.x.123
3. echo $DISPLAY 確認是否為 localhost:10.0
4. 打開 xmanager 或 xwin32 等 X Server 軟體
5. 執行 xterm 看是否有開啟 X 視窗
ok