...
!!!! Read before starting: if ansible run as root >>>>> use root's id_rsa file !!!!
!!!! But if it's for Juniper, use the user account to log into the router !!!!
juniper.junos module does not send a file to the router, but use netconfig
1- create the Private key & Public key ( .pub) on the Client: ssh-keygen
2- copy the public key to the server: ssh-copy-id or just a sftp
3- To set up SSH agent to avoid retyping passwords, you can do:
4- SSH test ( will ask for the passphrase once!)
5- check the Local keys:
6- check the Remote keys:
...
or just copy the file using ( if ssh-copy-id not supported ):
scp id_rsa.pub ansible@192.168.99.111:/var/home/ansible/
sftp
ansible@192.168.99.11
( then put /project/id_rsa.pub /var/home/ansible/id_rsa.pub )
...
| Check: after the ssh-copy-id, on the remote server: before/after ( /root/.ddh or /home/<username>/.ssh/ ) |
---|
...