1.輸入 /etc/init.d/S50sshd start 命令發現
提示“Privilege separation user sshd does not exist”錯誤
解決方法:在 /etc/passwd 中加入“sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin”
2.再次運行 /etc/init.d/S50sshd start,還是不成功
提示
Starting sshd: /var/empty must be owned by root and not group or world-writable.
原來是沒有權限
解決方法
chown -R root.root /var/empty
chmod 744 /var/empty
3.再次 啓動SSH "/etc/init.d/S50sshd start"
但是通過putty登陸SSH時,輸入真確的用戶名和密碼時,還是被拒絕
解決方法
在 /etc/ssh/sshd_config 中 將 PermitRootLogin yes解注,意思是開啓root 登陸
將 PasswordAuthentication yes,解注,意思是開啓密碼認證
最後重啓SSH, "/etc/init.d/S50sshd restart"