最近在我的CentOS机器上遇到硬件问题。 电源,内存,主板和CPU更换后,我认为我已经解决了硬件问题。
但是,我相信我有一个networkingconfiguration问题导致SSH远程连接失败。
我使用我的原始帐户和密钥尝试了常规的ssh,并在服务器期待之后收到连接超时: debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP 。
从服务器本身用一个新的帐户:
$ ssh -v -o PubkeyAuthentication=no chris@localhost Last login: ... [chris@dev ~]$
从局域网上的远程连接尝试远程SSH:
chris::Internets|10 ~ $ ssh -v -o PubkeyAuthentication=no chris@pug OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1: Reading configuration data /Users/chris/.ssh/config debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: Applying options for * debug1: /etc/ssh_config line 102: Applying options for * debug1: Connecting to pug [192.168.1.175] port 22. debug1: Connection established. debug1: identity file /Users/chris/.ssh/id_rsa type 1 debug1: identity file /Users/chris/.ssh/id_rsa-cert type -1 debug1: identity file /Users/chris/.ssh/id_dsa type -1 debug1: identity file /Users/chris/.ssh/id_dsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.2 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 debug1: match: OpenSSH_5.3 pat OpenSSH_5* debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP Read from socket failed: Operation timed out
我已经证实我可以:
我看到有关DNSparsing问题导致问题的post,我有UseDNS No ,应该完全避免DNS,不会导致问题。
这里有任何想法,因为我正在抓我的头,还有什么要寻找?
编辑:
/ var / log / secure具有以下内容:
Nov 29 11:19:45 dev sshd[5978]: fatal: Read from socket failed: Connection reset by peer
另外,我检查了SSH,并且正在监听22。
[root@dev ~]# lsof -i TCP:22 | grep LISTEN sshd 5424 root 3u IPv4 39030 0t0 TCP *:ssh (LISTEN) sshd 5424 root 3u IPv6 39032 0t0 TCP *:ssh (LISTEN)
为了避免并发症,我刷新了iptables:
[root@dev ~]# iptables -L -n Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
我怀疑networkingconfiguration的变化,因为你的MAC地址已经改变。 如果您在现有的Linux安装中换出主板,文件/etc/udev/rules.d/70-persistent-net.rules将为您的设备创build新的条目,并给它们新的名称。 所以,如果你之前有eth0和eth1,你现在可能会有eth2和eth3。 更改networking适配器后,您需要手动更新该文件。
另外,你可以显示你的防火墙规则( iptables -L -n )吗?
由于重新configuration,SSH主机密钥是否已更改? 如果是这样,那么REMOTE端的known_hosts文件可能与新主机键不同步,因此拒绝连接。