-
Notifications
You must be signed in to change notification settings - Fork 199
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
Key based SSH authentication does not work when switching to mitogen_linear #307
Comments
This is due to the presence of the word 'password' in the login banner. We can suppress the login banner by passing 'ssh -q' (e.g. via ssh_args in ansible.cfg), but then we lose diagnostic output. I will investigate updating the logic to only assume a password prompt if no newline appears following the prompt, which seems like a robust test, however it is sensitive to timing and buffering weirdness (SSH process may sleep indefinitely after writing 'password' but before writing the newline), so this might break things worse than they already are. Please try with the -q workaround above added to your ansible.cfg, and I will investigate some logic fix. Really the correct solution here is to move to Paramiko, but that's quite a lot of work. |
Yep.. the ideal solution is probably a combination of '-o "LogLevel ERROR"' by default, /and/ a slightly racy newline check. That way the racy aspect is only likely to be triggered when running with mitogen_ssh_debug_level=3 |
Login banner may include the password prompt, and there is no race-free way to detect the difference between the banner and the prompt.
Hi there, The fix for this is now on master -- it will make it into the next release. Meanwhile feel free to run from master, or use the previously mentioned workaround until a release is cut. |
Hi, |
…erence_ansible_changes Added source ip and checkout ip in env
I have followed the installation steps and changed Ansible default strategy to mitogen_linear.
Unfortunately, mitogen assumes that each SSH connection asks for a password. E.g.:
My user is setup to connect using SSH keys. Stock Ansible runs fine without specifying any additional SSH parameter.
The following is the command output using quadruple verbose logging:
The text was updated successfully, but these errors were encountered: