-   Linux - Newbie (
-   -   "No route to host" - ssh on fedora (

Inkit 11-03-2012 09:21 PM

"No route to host" - ssh on fedora
Hi all,
I'm not exactly a newbie to linux, but I'm no expert either. I've got user level experience on debian based distros but no more.

My problem is that I'm not able to ssh within my lan on fedora. I have two desktops and a laptop (all running mint debian till yesterday when I switched one desktop and the laptop to fedora) connected to a router (belkin router in which I've made no changes since previously). Desktop A runs fedora, while desktop B runs Mint xfce. I am able to ssh from desktop A to B without any trouble but when I try to connect to my laptop (running fedora and connects via wireless) I get the "no route to host" error. I have tried slotting in the ethernet cable and trying, but get the same error.

I've enabled the ssh checkbox on the firewall and started up openssh-server on both systems. I am able to ping from desktop A to the laptop and the other way round without any problems. I've tried hunting around on google, but all the explanations are a little above my head.

I would be very grateful for any help in getting this problem resolved.

linosaurusroot 11-03-2012 10:29 PM

If you can ping from A to laptop but not B to laptop then "netstat -nrv" probably differs between A and B.
Is DCHP being used or are they static IPs? Has the laptop been rebooted after being plugged in to the ethernet?

Inkit 11-03-2012 11:19 PM

I ran the netstat -nrv command on both the laptop as well as the desktop and they both return the same results as below.
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface UG 0 0 0 p33p1 U 0 0 0 p33p1

The only difference is that for the laptop the Iface says wlan0.
I have enabled DHCP on the router and am able to connect to the internet on both systems.
No I did not reboot the laptop after plugging in the ethernet cable, but it connected, an ip address was assigned and I was able to browse the net.

Edit - I know it's probably something very small because I'm able to ssh from my fedora desktop to the mint desktop. It's probably some setting on fedora that I've not done on the laptop. Don't know what.

linosaurusroot 11-04-2012 10:11 AM

Is the router and all 3 computer IP addresses 192.168.2.x ?

nijinashok00 11-04-2012 11:36 AM

I think it's the problem with DNS. Try to connect SSH using your ip address. If the problem still persist make sure that the port 22 is opened for ssh. Use

iptables -L

to list the firewall rules. You can enable port 22 by using the command

iptables -A INPUT -p tcp --dport 22 -j ACCEPT

Inkit 11-04-2012 08:14 PM

I'm sorry about the delayed response, but it's the time difference and I was in bed.

Yes, it is as you say.

I tried connecting to myself and did not have any problem. I could connect easily. I have opened port 22 in the firewall although I used the gui rather than change rules in iptables.


Inkit 11-04-2012 11:36 PM

I've fixed it now. I disabled the firewall in the laptop and connected via ssh. Once I had obtained the key I then enabled the firewall in the laptop and could connect easily after that. Don't know why I couldn't connect even with port 22 open in the firewall, but I'm ok with this feature (if it is indeed a feature) in fedora that requires that I manually disable the firewall before another system can get the ssh key.
I appreciate the help guys. Thanks

All times are GMT -5. The time now is 08:06 AM.