xshell連接不了虛擬機


一、問題描述:xshell連接不了虛擬機,出現錯誤提示:Connection closing...Socket close.Connection closed by foreign host.Disconnected from remote host(localhost) at 08:47:23.

 

二、查找錯誤原因:

1、登錄虛擬機,打開終端,切換到root用戶,輸入systemctl start sshd.service看能否開啟sshd服務,提示開啟失敗,輸入systemctl status sshd.service查看錯誤詳情,提示

failed to start openssh server daemon

2、輸入sshd -t(很有用)測試,提示/var/empty/sshd權限過大

三、解決方法

根據提示修改目錄權限:chmod -R 755 /var/empty/

再次登錄就可以登錄上了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM