LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-03-2012, 09:21 PM   #1
Inkit
Member
 
Registered: Feb 2011
Location: India
Distribution: Mint 10
Posts: 142

Rep: Reputation: 15
"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.

Last edited by Inkit; 11-03-2012 at 09:42 PM.
 
Old 11-03-2012, 10:29 PM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
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?
 
Old 11-03-2012, 11:19 PM   #3
Inkit
Member
 
Registered: Feb 2011
Location: India
Distribution: Mint 10
Posts: 142

Original Poster
Rep: Reputation: 15
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
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 p33p1
192.168.2.0 0.0.0.0 255.255.255.0 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.

Last edited by Inkit; 11-03-2012 at 11:22 PM.
 
Old 11-04-2012, 10:11 AM   #4
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Is the router 192.168.2.1 and all 3 computer IP addresses 192.168.2.x ?
 
Old 11-04-2012, 11:36 AM   #5
nijinashok00
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Rep: Reputation: Disabled
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
 
Old 11-04-2012, 08:14 PM   #6
Inkit
Member
 
Registered: Feb 2011
Location: India
Distribution: Mint 10
Posts: 142

Original Poster
Rep: Reputation: 15
I'm sorry about the delayed response, but it's the time difference and I was in bed.

linosaurusroot
Yes, it is as you say.

nijinashok00
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.

Thanks.
 
Old 11-04-2012, 11:36 PM   #7
Inkit
Member
 
Registered: Feb 2011
Location: India
Distribution: Mint 10
Posts: 142

Original Poster
Rep: Reputation: 15
Thumbs up

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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linksys WRT54G, ssh, "no route to host" marnold Linux - Networking 1 09-29-2010 12:33 PM
Handling a "No route to host" message in a script kaujot Programming 2 03-27-2008 06:14 PM
shorewall routing issue: "no route to host" from dmz spargonaut Linux - Networking 0 06-07-2007 10:09 AM
a/p connected, route correct, ping router: "Destination Host Unreachable". DebianEtch shinyblue Linux - Wireless Networking 1 08-29-2006 09:34 PM
Permanently set "route add" -host and default gw sacants Linux - Newbie 1 07-18-2003 04:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration