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

ConnectAuthError when using passphrased ssh key #92

Closed
DaCookie4u opened this issue Nov 19, 2015 · 1 comment
Closed

ConnectAuthError when using passphrased ssh key #92

DaCookie4u opened this issue Nov 19, 2015 · 1 comment

Comments

@DaCookie4u
Copy link

I am trying to get the library to work with ssh-key authentication. If the key is not protected by a password everything is fine. As soon as I protect it with a password I get the ConnectAuthError.

Other playbooks using the OpenSSH implementation connecting to Linux servers work just fine with the password protected key. I just get prompted by the system once for the password and they run.

Best regards,
Jesse

@stacywsmith
Copy link
Contributor

Ansible communicates with Junos devices different than most managed nodes.

With most managed nodes, Ansible makes an SSH connection to the node, pushes modules to the node, and executes the modules on the node. In this mode, Ansible is making the SSH connection.

With Junos devices, Ansible makes a "local" connection and executes the module directly on the local machine. The module then makes a NETCONF-over-SSH connection to the Junos device. In this mode, it's the module that is making the SSH connection.

For Junos devices using a password protected SSH key, you MUST specify the "passwd" option to pass the password to the module.

There are a few ways the password can be passed to the module.
This link covers how to prompt for the password, or use a vault to store the password:
http://www.juniper.net/techpubs/en_US/junos-ansible1.0/topics/task/configuration/junos-ansible-authenticating-users.html

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

No branches or pull requests

2 participants