SSH(xshell)连ubuntu出现Connection closed by foreign host

SSH(xshell)连ubuntu出现Connection closed by foreign host

 

Connection closed by foreign host....

该问题出现的原因是/etc/ssh目录下的文件的熟悉被修改了,从新修改回原始状态即可:

cd /etc/ssh

sudo chmod 644 ./*

sudo chmod 600 ssh_host_dsa_key

sudo chmod 600 ssh_host_rsa_key

sudo chmod 755 .

posted @ 2017-04-10 17:17  sunxiaolongblog  阅读(1251)  评论(0)    收藏  举报