Saturday, April 11, 2020

Ansible SSH configuration

<Ansible Installation                                                      Ansible: Adhoc Commands>

SSH Configuration

Configure ssh connection, on both Ansible server and Node servers.
Ansible Machine:
Generate a key, see the steps below.
$sudo su -

#ls –l

#cd  .ssh 

#ssh-keygen


Node-1
Create passwords, configure sshd file and start services.
To create the password,
#passwd root  ----->provide password
Edit the sshd_config file, In this Configuration file enable the Permit root login and Password authentification.
#vi /etc/ssh/sshd_config   ,
Permit root login  yes

password authentification yes
Restart the sshd service.
#systemctl restart sshd
Get the Ip address
#hostname –i   or   ip  a
Node-2
Follow the same steps on Node 2 used on Node 1.
Create the password,
#passwd root  ----->provide password
Edit the sshd_config file, In this Configuration file enable the Permit root login and Password authentification.
#vi /etc/ssh/sshd_config   ,
Permit root login  yes

password authentification yes
Restart the sshd service.
#systemctl restart sshd
Get the Ip address
#hostname –i   or   ip  a

From Master Side

#ssh-copy-id  root@node-1-ip 
#ssh-copy-id root@node-2-ip #ssh root@node-1-ip #ssh root@node-2-ip


No comments:

Post a Comment

Featured Post

Ansible Tool Introduction

                                                                                                                                    Next ...