I have run into a issue and wanted to get some inputs on it. I am not a linux expert but fair enough to keep myself afloat.
This is regarding SFTP command.
I have 2 servers who can communicate in SFTP fashion with out password prompt as i have the keys exchanged.
Server A and Server B.
Today all of sudden the connection was not establishing and all that i kept getting was:
Error: Could not open connection to `username@serverb': Could not open connection to `serverB': Connection lost
23/06/2014 12:32:28:529 SftpSftpG3/sftpg3.c:641/sftp_exit: Exit code: 5
Tried a lot of stuff like sftp -v and -vvv and every time kept getting the above error.
some google explained what exit code 5 was
but the actual problem was that the ID I was using to sftp had the password expired on it.
my Question and confusion: if the password was expired why did the verbose output not make any reference to the expiry of the password or indicated something that would tell me that the issue was with password.
What is the expected behavior of sftp with an inactive account ?
Note: Since the password was expired the ID being used to SFTP was marked as inactive and hence was having the connectivity issue.
Any inputs on this topic is highly appreciated.