主机升级ssh后,原来好使的项目就不能正常使用了,报错“Response exception,,Authentication by password failed”,但是实际情况不是密码问题,调试正常输出用户名和密码都是正常的,但是在主机上直接ssh [email protected] 就能成功。失败的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: [email protected];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

解决方案 »

  1.   

    后台的失败日志:
    2018-02-11 18:28:50.883 6959:2 taskexec-[Information] received request,publishNodeId=1609261000071345,execId=1802111800096636,operType=0,staffId=LUANHB2,extra=
    2018-02-11 18:28:50.953 6959:2 taskexec-[Information] ssh2 to 133.224.218.31:22,user=drecv1,passwd=Drecv_1204,execCmd:shellapp -n1609261000071345 -f1802111800096636 -p0 -oLUANHB2
    2018-02-11 18:28:50.953 6959:2 taskexec-[Debug] ssh2 connect to remote host...
    2018-02-11 18:28:51.253 6959:2 taskexec-[Debug] ssh2 ssh2_open_session1112018-02-11 18:28:51.254 6959:2 taskexec-[Error] Response exception,,Authentication by password failed.
      

  2.   

    这个问题我也遇到过,后来研究了下,是较新版本的ssh的 sshd_config 设置了不允许密码登陆,修改了就可以了。
    # To disable tunneled clear text passwords, change to no here!
    PasswordAuthentication yes