Configuring SSH Access to the Ansible Hosts

0 votes
How do I Configuring SSH Access to the Ansible Hosts? I didn't get a good material that explained it step by step.
Jan 17 in Ansible by Shakira
107 views

1 answer to this question.

0 votes

Hey @Shakira, follow these steps:

  • Execute the following command to get the ssh key of ansible non root user
cat ~/.ssh/id_rsa.pub
  • Copy the output onto your clipboard, open  a new terminal and connect to your ansible host
ssh sam@ansible_host_ip
  • switch to the client machine's root user
su
  • open the authorized_keys within the ~/.ssh directory:
nano ~/.ssh/authorized_keys
exit

And you're done, Hope this helped :)

answered Jan 17 by Sam

Related Questions In Ansible

0 votes
1 answer
0 votes
3 answers
0 votes
1 answer

Playbook to add hosts to the known hosts list - Ansible

Hey @Kiran, try something like this: - name: ...READ MORE

answered Mar 25 in Ansible by Haider
138 views
0 votes
1 answer

stopping different hosts from reading the same value when usign ansible in loop

Try using this. Create a new directory ...READ MORE

answered Jul 27, 2018 in Ansible by DareDev
• 6,810 points
41 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
212 views
0 votes
1 answer
0 votes
1 answer

How to run Ansible without hosts file?

Hey @Ruth, you can use ansible without using ...READ MORE

answered Feb 1 in Ansible by Anisha
166 views