Subject: | Password retry option |
In the case that the user and/or password is mis-entered, host may return:
'Permission denied, please try again.'
In such a case, should have Expect.pm check for this text and retry the password, or
terminate the session. Also, this text is printed to STDERR (i.e. ends up in my mod_perl
apache logs); it really should be captured by Expect.pm to prevent output to TTY.
I currently need to work around this password retry issue by setting a lower timeout, so that
the connection doesn't wait for the server to disconnect. However, I'm unable to determine
the reason for disconnect in such a case.
Suggestion is to enable Expect to detect when login (password-based) doesn't succeed, and
retry password if applicable. The $sftp->error should give some indication of password
failure, as well, if possible.