I\'m trying to use the pexpect module pxssh to log in into my one of my server. I get password refused. I think I know what it is the problem, but can\'t figure out how to f
I don't know if you are right on your diagnostic, I don't think the banner can cause that but a wrong prompt can do it for sure. Look at the code to be sure. http://www.opensource.apple.com/source/lldb/lldb-69/test/pexpect-2.4/pxssh.py
Especially that part:
elif i==2: # password prompt again
# For incorrect passwords, some ssh servers will
# ask for the password again, others return 'denied' right away.
# If we get the password prompt again then this means
# we didn't get the password right the first time.
self.close()
raise ExceptionPxssh ('password refused')
Disclaimer: this is not my code but Pxssh code. Why not using paramiko (http://www.lag.net/paramiko/) or pexpect directly?