-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add ssh.KeyboardInteractive to ssh.AuthMethod list #49
Comments
Yes, feel free to open the PR for review but I think we should answer with the password only to the password question, otherwise we may be leaking the password (imagine one of the answers to the questions is logged by the server because it wasn't meant to be a secret) |
Indeed, I will use regex to check if "[p|P]assword:" in a question and answer those with a password. |
I came across the same issue with Arista devices so I came up with this an amended version which checks for the Password prompt plus you could add further things into the switch statement for handling other custom prompts.
|
Arista switches, by default, allow only publickey and keyboard-interactive auth methods.
Gonir fails to create an ssh connection with the following error:
I fixed this error by adding ssh.KeyboardInteractive method to the ssh.ClientConfig:
ssh.KeyboardInteractive(...) simply answers with host.Password to all questions.
Please let me know if this is good enough to fix this issue, and I will submit a PR.
The text was updated successfully, but these errors were encountered: