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
58 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
28 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,670 points
25 views
+13 votes
2 answers
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
22 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.