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