QT-DevOps / DevOpsIssues

This Repo will be used to demonstrate the Skills & Questions in DevOps
Apache License 2.0
27 stars 131 forks source link

Unable to ping or connect Ubuntu machine (Ansible_Node) #1013

Closed Pravin-Kumar-GitHub closed 3 years ago

Pravin-Kumar-GitHub commented 3 years ago

I created a Ansible_Server (Master) running on RHEL 8 and followed all the steps for Ansible setup. And, I created another 2 servers for Ansible_Node (Slave) running on RHEL 8. I am getting success response from all 3 servers (Master -1 | Slave -2) while running ansible all -m ping

Now, I added another Ansible-Node (its a ubuntu machine 20.04). Getting below error while trying to do ssh-copy-id ubuntu's_private_DNS

Please help me to resolve this issue.

Kindly let me know if you need any other information. Thanks in Advance !


ssh-copy-id ip-172-31-15-16.ap-south-1.compute.internal /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/Pravin/.ssh/id_rsa.pub" /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys Pravin@ip-172-31-15-16.ap-south-1.compute.internal's password: mkdir: cannot create directory ‘.ssh’: Permission denied


Also, ansible all -m ping is failing for Ubuntu machine ansible all -m ping ip-172-31-15-16.ap-south-1.compute.internal | UNREACHABLE! => { "changed": false, "msg": "Failed to connect to the host via ssh: Pravin@ip-172-31-15-16.ap-south-1.compute.internal: Permission denied (publickey,password).", "unreachable": true }

Pravin-Kumar-GitHub commented 3 years ago

Issue is resolved. Able to connect now... In my ubuntu machine, I haven't created my username properly.

PING IS WORKING NOW ...

Closing this issue.