RHEL7 Connection closed by foreign host.

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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]$ 


查了一下终于找到了解决办法,只需要一些命令就可以了:

[[email protected] network-scripts]# cd /etc/ssh

[[email protected] 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

[[email protected] ssh]# chmod 644 ./*

[[email protected] ssh]# chmod 600 ssh_host_rsa_key

[[email protected] ssh]# chmod 755 .

[[email protected] ssh]# systemctl restart sshd.service

[[email protected] ssh]#

完成后在重新连接就行了。


本文出自 “花之旭的博客” 博客,请务必保留此出处http://huazhixu123.blog.51cto.com/1591874/1971465

以上是关于RHEL7 Connection closed by foreign host.的主要内容,如果未能解决你的问题,请参考以下文章

kex_exchange_identification: Connection closed by remote host

java.sql.Connection的close方法

净:ERR_CONNECTION_CLOSED

Connection closing...Socket close.

使用 Asp.net 连接字符串的 connection.close 和 connection.dispose 之间的区别? [复制]

Connection: close