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, 2019 in Ansible by Shakira
1,258 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, 2019 by Sam

Related Questions In Ansible

0 votes
1 answer
+1 vote
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 26, 2019 in Ansible by Haider
3,356 views
0 votes
1 answer

How to list down all the hosts in Ansible?

Hi@akhtar, You can use the option --list-hosts. It will ...READ MORE

answered Jul 28, 2020 in Ansible by MD
• 95,460 points
48,542 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,065 views
+2 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, 2019 in Ansible by Anisha
2,934 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP