How to solve: "Connect to host some_hostname port 22: Connection timed out"

Posted by Aufwind on Ask Ubuntu See other posts from Ask Ubuntu or by Aufwind
Published on 2012-03-08T08:54:46Z Indexed on 2013/06/25 10:29 UTC
Read the original article Hit count: 223

I have two Ubuntu machines. Both have openssh-client and openssh-server installed on them. ssh-ing from machine G (fresh Ubuntu 11.10 installation) to machine K works great. But ssh-ing from machine K to machine G results always in the Error:

Connect to host some_hostname port 22: Connection timed out

I went through the troubleshooting section of help.ubuntu.com and I got the following results:

ps -A | grep sshd # results in
848 ?        00:00:00 sshd

-

sudo ss -lnp | grep sshd # results in
0   128   :::22   :::*   users:(("sshd",848,4))
0   128   *:22    *:*    users:(("sshd",848,3))

-

ssh -v localhost # works!

-

sudo ufw status verbose # yields: "Status: inactive"

I haven't change anything in the config file. What can I do to locate the Problem and solve it? Glad about every hint!

Edit:

ping was succesful in both directions!

I did a telnet <machineK> 22 from machin G which resulted in Trying and then in telnet:

Unable to connect to remote host: Connection timed out.

But telnet the other way around worked just fine!

Edit 2:

ssh start/running, process 966 # yields: ssh start/running, process 966

/etc/hostname # contains my hostname, let's call it blubb
/etc/hosts # contains the following
127.0.0.1       localhost
# 127.0.1.1     blubb
129.26.68.74    blubb # I added this!

-

sudo service ufw status # yields: ufw start/running

I installed Gufw and set it to ON. Then I selected from Incoming the option ALLOW. Then I sshed to another machine from where I sshed back to my machine. Still the same error as above: connect to host blubb port 22: Connection timed out

Any more hints, what I can check?

© Ask Ubuntu or respective owner

Related posts about ssh

Related posts about configuration