茫茫網海中的冷日 - 對這文章發表回應
茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1730370 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
IMG_60D_00007.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

對這文章發表回應

發表限制: 非會員 可以發表

發表者: 冷日 發表時間: 2012/6/21 10:18:32
補充一下,如果上述的 ssh chroot 碰到類似如下的問題:
Starting sshd:/etc/ssh/sshd_config: line 119: Bad configuration option: xSubsystem
/etc/ssh/sshd_config: line 122: Bad configuration option: Match
/etc/ssh/sshd_config: line 123: Bad configuration option: ChrootDirectory
/etc/ssh/sshd_config: line 124: Bad configuration option: XllForwarding
/etc/ssh/sshd_config: line 126: Bad configuration option: ForceCommand
/etc/ssh/sshd_config: terminating, 5 bad configuration options
                                                           [FAILED]
[root@hkhkgls1089 ssh]#

或是:
Starting sshd:/etc/ssh/sshd_config: line 123: Bad configuration option: Match
/etc/ssh/sshd_config: line 124: Bad configuration option: ChrootDirectory
/etc/ssh/sshd_config: line 125: Bad configuration option: XllForwarding
/etc/ssh/sshd_config: line 127: Bad configuration option: ForceCommand
/etc/ssh/sshd_config: terminating, 4 bad configuration options
                                                           [FAILED]

那應該是 ssh 的版本過舊導致
目前得知訊息,ChrootDirectory 好像是要 4 之後才支援(目前確認 openssh 4.3p2 可行)
檢查方法如下:
rpm -qa |grep ssh


所以,如果是 CentOS4 的話,就是只有更新 ssh 一途可行。
偏偏 yum 更新現在又不支援 CentOS4 了,所以只能自己想辦法囉。
註:或是更新到 CentOS5 以上應該就 OK 囉!

另外有一個重點必須說一下,以免大家和冷日一樣在這問題上花費多餘的時間:
設定 Chroot 目錄權限:錯誤的目錄權限設定會導致在 log 中出現 "fatal: bad ownership or modes for chroot directory XXXXXX" 的訊息。
根據 openssh 5.1 chrootdirectory permissions issue 這篇文章的資訊顯示,目錄的權限設定有兩個要點:
由 ChrootDirectory 指定的目錄開始一直往上到系統根目錄為止的目錄擁有者都只能是 root
由 ChrootDirectory 指定的目錄開始一直往上到系統根目錄為止都不可以具有群組寫入權限
內容圖示
url email imgsrc image code quote
樣本
bold italic underline linethrough   












 [詳情...]
validation picture

注意事項:
預覽不需輸入認證碼,僅真正發送文章時才會檢查驗證碼。
認證碼有效期10分鐘,若輸入資料超過10分鐘,請您備份內容後,重新整理本頁並貼回您的內容,再輸入驗證碼送出。

選項

Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|