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 192.168.100.xxx port 22: No route to host

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

link|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
feedback

4 Answers

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.

link|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
feedback

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 0.0.0.0 to listen on all) and be sure you have the line Port 22 in it too.

link|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
feedback

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

link|improve this answer
feedback

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 "0.0.0.0:22" for OK, or "127.0.0.1:22" 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".

-seikku-

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.