ansible ssh: connect to host 172.x.x.x port 22: No route to host

24 views
Skip to first unread message

Abdulrehman Khurram

unread,
Apr 16, 2023, 1:28:34 PM4/16/23
to Ansible Development
Facing using while connecting to remote host

Magnus Lubeck

unread,
Apr 16, 2023, 2:00:58 PM4/16/23
to Abdulrehman Khurram, Ansible Development
Well, this is in no way an ansible issue, unless you are a bit more verbose.

Do you have any console output?
Can you ping the host?
Can you ssh to the host as the ansible user?

If not, solve those issues, then come back.

Sent from my iPhone

On 16 Apr 2023, at 19:28, Abdulrehman Khurram <abdulrehma...@gmail.com> wrote:

Facing using while connecting to remote host

--
You received this message because you are subscribed to the Google Groups "Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/af72f9a7-7477-4ea3-9ff1-0e11d2c4ad9cn%40googlegroups.com.
Message has been deleted

Jonathan Kamens

unread,
Apr 17, 2023, 9:22:12 AM4/17/23
to ansibl...@googlegroups.com

"solve those issues. then come back," does not mean, "Post those issues here and we will help you solve them."

This list is intended for discussion of Ansible development. It is not intended for Ansible usage questions, and it is certainly not intended for generic IT questions such as yours. We have no idea why you can't ping or SSH to 172.31.28.77 from 172.31.30.161. Whatever the answer to that question is, it has nothing to do with Ansible, and this isn't the right place to ask for help solving it.

(I usually send "This doesn't belong on this list" admonishments privately, but I'm sending this one to the list because I already told the OP this privately and yet he persists in sending off-topic emails to the list.)

On 4/17/23 00:31, Abdulrehman Khurram wrote:
[root@ip-172-31-30-161 home]# su - ansible
Last login: Sun Apr 16 16:21:38 UTC 2023 on pts/0
[ansible@ip-172-31-30-161 ~]$ ssh jen...@172.31.28.77
ssh: connect to host 172.31.28.77 port 22: No route to host
[ansible@ip-172-31-30-161 ~]$ ping 172.31.28.77
PING 172.31.28.77 (172.31.28.77) 56(84) bytes of data.
From 172.31.30.161 icmp_seq=1 Destination Host Unreachable
From 172.31.30.161 icmp_seq=2 Destination Host Unreachable
From 172.31.30.161 icmp_seq=3 Destination Host Unreachable
From 172.31.30.161 icmp_seq=4 Destination Host Unreachable
From 172.31.30.161 icmp_seq=5 Destination Host Unreachable
From 172.31.30.161 icmp_seq=6 Destination Host Unreachable
From 172.31.30.161 icmp_seq=7 Destination Host Unreachable
From 172.31.30.161 icmp_seq=8 Destination Host Unreachable
From 172.31.30.161 icmp_seq=9 Destination Host Unreachable
Reply all
Reply to author
Forward
0 new messages