Connecting to 192.168.2.222:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
Connection closed by foreign host.
Type `help' to learn how to use Xshell prompt.
设置超时时间
可能是ssh设置的问题
cd /etc/ssh
vim sshd_config
#找到以下几个参数并修改成如下结果
PermitRootLogin yes
ClientAliveCountMax 60
#ClientAliveCountMax设置成60分钟,运行root登录
#重新载入ssh参数
service sshd reload //命令
#重新启动ssh服务
service sshd stop //命令
#service sshd restart //命令
service sshd start //命令