You can follow these step to make machine passwordless.
Step:1 First generate the public/private key pair on the Ansible control 
machine: 
$ ssh-keygen –t rsa

Step:2 Enable the RSA-SSH authentication feature on the Dell switch by 
executing the following command:
# ip ssh rsa-authentication enable

Step:3 Configure the username and password on the Dell switch. The 
RSA-authentication public key will be added to the admin. 
# username admin password xxxx privilege 15

Step:4 Login to the Dell switch using SSH and username admin. Copy the 
public key of the Ansible control machine to the Dell switch: 
# copy scp: flash: 
Address or name of remote host []: 100.67.1.10 
Source file name []: .ssh/id_rsa.pub 
User name to login remote host: root 
Password to login remote host:
Destination file name [id_rsa.pub]: 
224 bytes successfully copied Leaf1A#

Step:5 Login into the Dell EMC Networking switch through SSH and configure 
the public key on the Dell EMC Networking switch by executing the following 
command:
# ip ssh rsa-authentication my-authorized-keys id_rsa.pub
RSA keys added to admin's list of authorized-keys. 
Delete the file id_rsa.pub : (yes/no) ? yes

Step:6 Verify the SSH connection by executing the following command:
$ ssh 100.67.170.31 -i .ssh/id_rsa -l admin


On Friday, August 11, 2017 at 1:10:45 AM UTC+5:30, Lupe Silva wrote:
>
> I am looking to use ansible with my Dell X1000 series switches.  There is 
> no network modules for these switches which is fine for me.  I plan to use 
> the raw module.
>
> My issue is that when you connect to these switches via SSH, the switches 
> always ask for the UserID and Password.   Even when you use "ssh 
> userid@switch" it will ask you for your user id and password.
>
> Is there a way to have ansible use an "expect" type of solution for the 
> initial login via ssh?
>
> It may be something like additional args in ansible_ssh_args but I cannot 
> figure it out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c3d96c43-114a-41db-84ba-b616b8b27931%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to