- 论坛徽章:
- 0
|
命令都一样 ssh -vvv 10.78.208.72
正常应该是这样的:
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug2: input_userauth_pk_ok: fp 63:cb:9d:06:21:5c:e2:d6:29:cb:f6:5b:94:96:72:84
debug3: sign_and_send_pubkey: RSA 63:cb:9d:06:21:5c:e2:d6:29:cb:f6:5b:94:96:72:84
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
这样就能ssh登录成功。
当出现错误的时候会这样:
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug2: input_userauth_pk_ok: fp 63:cb:9d:06:21:5c:e2:d6:29:cb:f6:5b:94:96:72:84
debug3: sign_and_send_pubkey: RSA 63:cb:9d:06:21:5c:e2:d6:29:cb:f6:5b:94:96:72:84
debug1: read PEM private key done: type RSA
Connection to 10.78.208.72 timed out while waiting to read
这时候就无法ssh登录了。
我用脚本测试了1000次登录,837次登录成功,163次登录失败。
/var/log/messages里面没有任何报错或提示。
请教各位高手,这个问题可能出现在什么地方。
这是ssh的配置文件,参考其他正常的主机配置,没有不同的地方:
cat /etc/ssh/sshd_config|grep -v "#"|sort -n
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_IDENTIFICATION LC_ALL
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AuthorizedKeysFile .ssh/authorized_keys
ClientAliveInterval 60
PasswordAuthentication yes
Subsystem sftp /usr/lib64/ssh/sftp-server
UseDNS no
UsePAM yes
X11Forwarding yes |
|