Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better detection of ssh yes/no questions #81

Open
GoogleCodeExporter opened this issue Mar 10, 2016 · 1 comment
Open

better detection of ssh yes/no questions #81

GoogleCodeExporter opened this issue Mar 10, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Checking if prompt ends in 'password:' doesn't allow passphrases for key auth. 
Reverse logic to check for 'yes/no' question instead.

Original issue reported on code.google.com by [email protected] on 21 Feb 2013 at 5:11

Attachments:

@GoogleCodeExporter
Copy link
Author

The problem is that in theory, ssh could ask anything. In the past, I've seen 
passwords and yes/no questions. Apparently (issue #80), it can also ask for the 
passphrase for a key. But in theory, it could also ask for a username or 
something else entirely. Clearly we can't perfectly detect whether or not a 
prompt is asking for some sort of password, and it's a shame that ssh doesn't 
have a more structured way of specifying what it wants in addition to sending a 
free-form prompt.

In general, I think it's best to be conservative and to only send a password if 
we're sure that it's requested. It would be a shame for passwords to 
accidentally end up in log files or other places, and this could happen for a 
long time before anyone would notice and report it as a bug in pssh. I could be 
persuaded to change the logic if the ssh behavior wasn't completely 
undocumented, but as it is, it seems like being paranoid with the input is the 
safe thing to do.

Do you agree with this? If not, I would be happy to hear arguments for the 
other side.

Original comment by [email protected] on 21 Feb 2013 at 5:47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant