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]#
完成后在重新连接就行了。
今天连接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]#
完成后在重新连接就行了。
相关文章推荐
- Xshell连接CentOS 6.9掉线 Connection closed by foreign host
- ssh连接报Connection closed by foreign host.
- macro.xml:116: com.jcraft.jsch.JSchException: connection is closed by foreign host
- telnet mysql时出现:is not allowed to connect to this MySQL serverConnection closed by foreign host问题的解决
- Connection closed by foreign host
- Connection closed by foreign host.-运营商线路问题导致
- Connection closed by foreign host无法连接linux
- Unencrypted connection refused. Goodbye. Connection closed by foreign host.
- Connection closed by foreign host
- SVN——Connection closed by foreign host
- centos + qmail + telnet +open localhost 25 出现 Connection closed by foreign host
- ubuntu 12.04中xshell链接报: Connection closed by foreign host.错误
- Connection closed by foreign host原因ip冲突及解决办法
- Connection closed by foreign host
- Escape character is '^]'. Connection closed by foreign host.
- XShell提示Connection closed by foreign host的问题 和 路由器分配IP的规则
- unblock with 'mysqladmin flush-hosts'Connection closed by foreign host.
- Ubuntu 连接错误 Connection closed by foreign host
- XShell连不上本机虚拟机报:Connection closed by foreign host.
- CentOS7.1 Xshell 经常掉线 Connection closed by foreign host