Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to ssh from my laptop to my desktop (both fedora 14) over a local network. I can ping my desktop and get responses, but if I ssh to it, I receive

ssh: connect to host port 22: No route to host

I can ssh from the desktop to itself. What might the problem be?

share|improve this question
I just ran nmap -sS -F <ip-address-of-desktop> and it appears that port 22 is not open even though sshd is running. How do I fix this? – jonderry Mar 9 '11 at 21:42
up vote 1 down vote accepted

Sounds Firewall-y - check the firewall status on the target machine and try with it turned off (if it's on). If it is a firewall issue, you could leave it off OR modify the settings to allow connections on port 22. If you need help with this just holler.

share|improve this answer
Went to systems -> preferences -> firewall and uncheck/rechecked SSH and hit apply/reload. For some reason even though SSH was checked, the port had not been opened. After this, it works. – jonderry Mar 9 '11 at 22:03
Glad its sorted. – Linker3000 Mar 9 '11 at 22:23

Is your desktop ssh daemon listening on 192.168.100.XXX IP or only on lo interface? Check in /etc/ssh/sshd_config file for line ListenAddress IP (or to listen on all) and be sure you have the line Port 22 in it too.

share|improve this answer
the line Port 22 is commented out, but it's also commented out on my laptop, and I can ssh into my laptop fine. – jonderry Mar 9 '11 at 21:52
So if ssh daemon is listening on the right port and ip, it is probably a firewall issue as Linker3000 said. – laurent Mar 9 '11 at 22:00

Port 22 should have been open by default in fedora 14, but you can open /etc/sysconfig/iptables and make sure this line reads as follows:

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

Then you can run the restart command for iptables: /etc/init.d/iptables restart

share|improve this answer

Looks like both laurent-rpnet and Linker3000 have a point in this. Either the ssh is not listening on ethernet, or firewall is blosking requests, or both. Check the listener with "netstat -ltn" and look for "" for OK, or "" for BAD. Check the firewall by turning it temporally off by "service iptables stop", then try to ssh in, and remember to restart the firewall "service iptables start".


share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .