


Linux系統上SSH無法啟動
添加時間:2016-7-28 21:23:58
添加:
思海網絡
在機器上直接登錄,問題顯示如下:
/var/empty/sshd must be owned by root and not group or world-writable.
問題:
Linux上的SSH無法啟動
報告/var/empty/sshd must be owned by root and not group or world-writable.
解決辦法:
首先通過物理終端進入到linux上,手工檢查ssh發現沒運行
-bash-2.05b# /etc/init.d/sshd status
sshd is stopped
手工啟動服務,發現報告權限錯誤。
-bash-2.05b# /etc/init.d/sshd start
Starting sshd:/var/empty/sshd must be owned by root and not group or world-writable.
[FAILED]
-bash-2.05b#
使用rpm -V 命令可檢查到ssh的軟件包正常,但某個目錄的屬主錯誤。
-bash-2.05b# rpm -V openssh-server
S.5..... c /etc/ssh/sshd_config
.....U.. /var/empty/sshd
-bash-2.05b#
經查看發現這個目錄的屬主不是root,所以啟動ssh報錯
-bash-2.05b# ls -ld /var/empty/sshd/
d--x--x--x 2 vu00106 root 1024 Feb 2 2005 /var/empty/sshd/
-bash-2.05b#
修改為root屬主,啟動成功
-bash-2.05b# chown root /var/empty/sshd/
-bash-2.05b# /etc/init.d/sshd start
Starting sshd: [ OK ]
-bash-2.05b#
至此問題修復。
另外,還可以嘗試:
這個是權限的問題
可采取以下兩步解決
chown -R root.root /var/empty/sshd
chmod 744 /var/empty/sshd
service sshd restart
就可以解決上述的問題。
關鍵字:Linux、系統、SSH
新文章:
- CentOS7下圖形配置網絡的方法
- CentOS 7如何添加刪除用戶
- 如何解決centos7雙系統后丟失windows啟動項
- CentOS單網卡如何批量添加不同IP段
- CentOS下iconv命令的介紹
- Centos7 SSH密鑰登陸及密碼密鑰雙重驗證詳解
- CentOS 7.1添加刪除用戶的方法
- CentOS查找/掃描局域網打印機IP講解
- CentOS7使用hostapd實現無AP模式的詳解
- su命令不能切換root的解決方法
- 解決VMware下CentOS7網絡重啟出錯
- 解決Centos7雙系統后丟失windows啟動項
- CentOS下如何避免文件覆蓋
- CentOS7和CentOS6系統有什么不同呢
- Centos 6.6默認iptable規則詳解