远程连接一台linux机器,centos 5.6. 刚登录session就飞了,有的时候就不飞,具体报错如下,求大侠帮忙看看。
我尝试过的方法:
1. 不是ssh idle session问题,应为是session刚登录就飞了。
2. 也设置过ClientAliveInterval的参数,重启SSH都问题依旧。
# grep -i client /etc/ssh/sshd_config
#ClientAliveInterval 0
#ClientAliveCountMax 3
ClientAliveInterval 300
ClientAliveCountMax 20
3. 不是防火墙问题,局域网连接也有一样的报错。
4. 局域网IP没有冲突。
报错信息:
[root@host1 ~]# Read from remote host 10.2.135.5: Connection reset by peer
Connection to 10.2.135.5 closed.
Debug log:
Jun 9 19:16:07 host1 sshd[14856]: debug1: PAM: reinitializing credentials
Jun 9 19:16:07 host1 sshd[14856]: debug1: permanently_set_uid: 0/0
Jun 9 19:16:11 host1 sshd[14852]: Read error from remote host 10.2.73.101: Connection reset by peer
Jun 9 19:16:11 host1 sshd[14852]: debug1: do_cleanup
Jun 9 19:16:11 host1 sshd[14852]: debug1: PAM: cleanup
Jun 9 19:16:11 host1 sshd[14852]: debug1: PAM: closing session
Jun 9 19:16:11 host1 sshd[14852]: pam_unix(sshd:session): session closed for user root
Jun 9 19:16:11 host1 sshd[14852]: debug1: PAM: deleting credentials
Jun 9 19:16:11 host1 sshd[14852]: debug1: session_pty_cleanup: session 0 release /dev/pts/0
收起