您的位置:首页 > 其它

RHEL7 Connection closed by foreign host.

2017-10-11 16:28 483 查看
RHEL7 Connection closed by foreign host.
今天连接Linux时居然连不上,报错信息是:
Connecting to 10.10.10.116: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.
[C:\Users\huazhixu]$

查了一下终于找到了解决办法,只需要一些命令就可以了:
[root@db1 network-scripts]# cd /etc/ssh
[root@db1 ssh]# ll
总用量 268
-rwxrwxr-x. 1 root root 242153 3月 20 2014 moduli
-rwxrwxr-x. 1 root root 2123 3月 20 2014 ssh_config
-rwxrwxr-x. 1 root root 4432 10月 11 15:56 sshd_config
-rwxrwxr-x. 1 root ssh_keys 227 10月 11 13:10 ssh_host_ecdsa_key
-rwxrwxr-x. 1 root root 162 10月 11 13:10 ssh_host_ecdsa_key.pub
-rwxrwxr-x. 1 root ssh_keys 1679 10月 11 13:10 ssh_host_rsa_key
-rwxrwxr-x. 1 root root 382 10月 11 13:10 ssh_host_rsa_key.pub
[root@db1 ssh]# chmod 644 ./*
[root@db1 ssh]# chmod 600 ssh_host_rsa_key
[root@db1 ssh]# chmod 755 .
[root@db1 ssh]# systemctl restart sshd.service
[root@db1 ssh]#
完成后在重新连接就行了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  by Connection closed