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 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/
  • 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
  • open the authorized_keys within the ~/.ssh directory:
nano ~/.ssh/authorized_keys

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
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,320 points
+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
+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
0 votes
1 answer