Fixed ssh-key auth#281
Conversation
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
|
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') |
|
@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! |
Fixed ssh-key auth
|
Please, have a look at #648 as I wasn't happy with it was decided if the agent should be used. |
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