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

Fixed ssh-key auth #281

Merged
merged 3 commits into from
Jul 17, 2014
Merged

Fixed ssh-key auth #281

merged 3 commits into from
Jul 17, 2014

Conversation

shermdog
Copy link
Contributor

Added the ability to use IdentityFile from .ssh/config file
Also re-enabled default of underlying ncclient allow_agent and look_for_keys
By default ncclient will:
1. Try passed in keyfile
2. Look for keys loaded in agent
3. Look for default keys in user home
4. Try passed in user/pass combo

Added the ability to use IdentityFile from .ssh/config file
Also re-enabled default of underlying ncclient allow_agent and look_for_keys
By default ncclient will:
	1. Try passed in keyfile
	2. Look for keys loaded in agent
	3. Look for default keys in user home
	4. Try passed in user/pass combo
@shermdog
Copy link
Contributor Author

I should also note, with this change if a key file is present but requires a password it can be passed in Device(host='host', passwd='key_password')

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) when pulling 9ccc274 on shermdog:sshident into 733921e on Juniper:master.

@jeremyschulman
Copy link
Contributor

@shermdog - the prior code was designed such that when running the program the user was not presented with a popup dialog prompting for a sshkey password. I like the addition of supporting the ssh key files as we discussed. I see that you re-enabled the flags in the underlying ncclient connect that caused the "popup". So long as your new changes ensure "no popup" I think you are A-OK. I spent a bit of time testing all the scenarios before; so please add the necessary test/unit moch test cases so that you don't have to keep doing it manually. Thank you!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) when pulling 7abe593 on shermdog:sshident into 733921e on Juniper:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) when pulling 9f32d68 on shermdog:sshident into 733921e on Juniper:master.

shermdog added a commit that referenced this pull request Jul 17, 2014
@shermdog shermdog merged commit 32323fb into Juniper:master Jul 17, 2014
shermdog added a commit to shermdog/py-junos-eznc that referenced this pull request May 20, 2015
@vincentbernat
Copy link
Contributor

Please, have a look at #648 as I wasn't happy with it was decided if the agent should be used.

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

Successfully merging this pull request may close these issues.

4 participants