-
Notifications
You must be signed in to change notification settings - Fork 3
SSH Keys
khodayard edited this page Apr 14, 2020
·
2 revisions
We need to configure Ansible management machine (in this case our router) to access all hosts without password, so we have to create an SSH key without a password and copy it to all nodes:
[root@dns01 ~]# ssh-keygen
[root@dns01 ~]# for host in mst01.okd.lcl mst02.okd.lcl mst03.okd.lcl wrk01.okd.lcl wrk02.okd.lcl wrk03.okd.lcl inf01.okd.lcl inf02.okd.lcl inf03.okd.lcl glf01.okd.lcl glf02.okd.lcl glf03.okd.lcl glr01.okd.lcl glr02.okd.lcl glr03.okd.lcl nlb01.okd.lcl ;
do ssh-copy-id -i ~/.ssh/id_rsa.pub $host; \
done