xshell鏈接不了虛擬機處理方法(錯誤提示:Connection closing...Socket close.Connection closed by foreign host.Discon...

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

 

2、查找錯誤緣由:ssh

一、登陸虛擬機,打開終端,切換到root用戶,輸入systemctl start sshd.service看可否開啓sshd服務,提示開啓失敗,輸入systemctl status sshd.service查看錯誤詳情,提示測試

failed to start openssh server daemonurl

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

3、解決方法server

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

再次登陸就能夠登陸上了rem

 

參考url:https://yq.aliyun.com/articles/103191?t=t1虛擬機

若是對您有幫助,請給我點個贊>∏<,有什麼不正確的也麻煩指出io

相關文章
相關標籤/搜索