Ansible: SSH Configuration

This blog receives a commission from affiliate partners through the affiliate links that we share with you in our posts. Although we receive a commission for using and linking their products, all our opinions and suggestions are unbiased.

Ansible SSH configuration

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

#ssh-copy-id  [email protected] 

#ssh-copy-id [email protected]

#ssh [email protected]

#ssh [email protected]

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   or  ifconfig

 

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   or  ifconfig

Venkata Narayana Yarava

Venkata Narayana Yarava is an experienced Cloud DevOps Engineer with exposure to various technologies, he has a experience in DevOps Training and with different IT environments. He has a huge passion for automation technologies, specifically DevOps Tools, OpenStack, AWS, Linux, open source software. If you enjoy our articles please support us and make a small contribution: Buy Us A Coffee