遇到问题:
Connecting to 服务器IP...
Connection established.To escape to local shell, press 'Ctrl+Alt+]'.
Connection closing...Socket close.
Connection closed by foreign host.
Disconnected from remote host(连接名) at 11:05:26.
Type `help' to learn how to use Xshell prompt.
解决方案:(修改权限)
[root@ip-XX~]# cd /etc/ssh
[root@ip-XX ssh]# sudo chmod 644 ./*
[root@ip-XX ssh]# sudo chmod 600 ssh_host_dsa_key
[root@ip-XX ssh]# sudo chmod 600 ssh_host_rsa_key
[root@ip-XX ssh]# sudo chmod 755 .
[root@ip-XX ssh]# /etc/init.d/sshd restart