Skip Menu |

This queue is for tickets about the Net-SFTP-Foreign CPAN distribution.

Report information
The Basics
Id: 37020
Status: rejected
Priority: 0/
Queue: Net-SFTP-Foreign

People
Owner: Nobody in particular
Requestors: RYBSKEJ [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 1.38



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.
Password authentication interaction can be completely customized from the remote end and there isn't a reliable way to know if it finalizes successfully or not. Probably, the current password authentication handling code could be replaced for something fancier, but I prefer it to remain simple and predictable so I am not going to change it (at least, for the moment). As a work around, you can use the 'transport' option to handle the connection/authentication to the remote side in any way you need. Don't hesitate to ask if you need any help doing it. Cheers, - Salva