关于libssh2,登陆失败Authentication by password failed
主机升级ssh后,原来好使的项目就不能正常使用了,报错“Response exception,,Authentication by password failed”,但是实际情况不是密码问题,调试正常输出用户名和密码都是正常的,但是在主机上直接ssh user@x.x.x.x 就能成功。
失败的syslog
Feb 11 18:28:51 jfapp1 sshd[19843]: SSH: Server;Ltype: Version;Remote: 133.224.218.33-51415;Protocol: 2.0;Client: libssh2_1.8.0
Feb 11 18:28:51 jfapp1 sshd[19843]: SSH: Server;Ltype: Kex;Remote: 133.224.218.33-51415;Enc: aes128-ctr;MAC: hmac-sha2-256;Comp: none [preauth]
Feb 11 18:28:51 jfapp1 sshd[19843]: SSH: Server;Ltype: Authname;Remote: 133.224.218.33-51415;Name: drecv1 [preauth]
成功的syslog
Feb 11 18:29:46 jfapp1 sshd[25964]: SSH: Server;Ltype: Version;Remote: 133.224.218.35-53441;Protocol: 2.0;Client: OpenSSH_7.3p1+sftpfilecontrol-v1.3-hpn14v11
Feb 11 18:29:46 jfapp1 sshd[25964]: SSH: Server;Ltype: Kex;Remote: 133.224.218.35-53441;Enc: chacha20-poly1305@openssh.com;MAC: <implicit>;Comp: none [preauth]
Feb 11 18:29:46 jfapp1 sshd[25964]: SSH: Server;Ltype: Authname;Remote: 133.224.218.35-53441;Name: drecv1 [preauth]
Accepted keyboard-interactive/pam for drecv1 from 133.224.218.35 port 53441 ssh2
之前正常使用的版本:
[/opt/openssl/lib/hpux64]$ssh -V
OpenSSH_6.2p1+sftpfilecontrol-v1.3-hpn13v12, OpenSSL 0.9.8o 01 Jun 2010
HP-UX Secure Shell-A.06.20.006, HP-UX Secure Shell version
升级后不能正常使用的版本:
[/drecvdata/drecv1]$ssh -V
OpenSSH_7.3p1+sftpfilecontrol-v1.3-hpn14v11, OpenSSL 1.0.2k 26 Jan 2017
HP-UX Secure Shell-A.07.30.003, HP-UX Secure Shell version