LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-17-2009, 04:24 PM   #1
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
cant ssh into laptop


hi, my laptop is running fedora-9 live-usb and my desktop is running knoppix-5 live-cd.

they are both ethernet attached to a netgear wgr614v8.
the knoppix machine has ip address 192.168.5.25 and the fedora machine has address 192.168.5.2. i dont see anything obviousely wrong in the router configuration.
Code:
knoppix@1[~]$ ping -c 1 192.168.5.1
PING 192.168.5.1 (192.168.5.1) 56(84) bytes of data.
64 bytes from 192.168.5.1: icmp_seq=1 ttl=64 time=0.646 ms

--- 192.168.5.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.646/0.646/0.646/0.000 ms
knoppix@1[~]$ ping -c 1 192.168.5.2
PING 192.168.5.2 (192.168.5.2) 56(84) bytes of data.
64 bytes from 192.168.5.2: icmp_seq=1 ttl=64 time=6.10 ms

--- 192.168.5.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 6.105/6.105/6.105/0.000 ms
knoppix@1[~]$ ping -c 1 192.168.5.3
PING 192.168.5.3 (192.168.5.3) 56(84) bytes of data.
From 192.168.5.25 icmp_seq=1 Destination Host Unreachable

--- 192.168.5.3 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

knoppix@1[~]$ ping -c 1 192.168.5.4
PING 192.168.5.4 (192.168.5.4) 56(84) bytes of data.
From 192.168.5.25 icmp_seq=1 Destination Host Unreachable

--- 192.168.5.4 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

knoppix@1[~]$ ping -c 1 192.168.5.25
PING 192.168.5.25 (192.168.5.25) 56(84) bytes of data.
64 bytes from 192.168.5.25: icmp_seq=1 ttl=64 time=0.048 ms

--- 192.168.5.25 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.048/0.048/0.048/0.000 ms
knoppix@1[~]$ ssh 192.168.5.1
ssh: connect to host 192.168.5.1 port 22: Connection refused
knoppix@1[~]$ ssh 192.168.5.2
ssh: connect to host 192.168.5.2 port 22: No route to host
knoppix@1[~]$ ssh 192.168.5.3
ssh: connect to host 192.168.5.3 port 22: No route to host
knoppix@1[~]$ ssh 192.168.5.4
ssh: connect to host 192.168.5.4 port 22: No route to host
knoppix@1[~]$ ssh 192.168.5.25
ssh: connect to host 192.168.5.25 port 22: Connection refused
why is it saying 'no route to host' when the host is on and connected (it takes a few seconds to come back with that error but with 192.168.5.3 and 192.168.5.4 it comes back instantaneously). it should at least try to connect and if the server isnt on should say 'connection refused' (like 192.168.5.25).
 
Old 08-17-2009, 06:46 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by schneidz
it should at least try to connect and if the server isnt on should say 'connection refused' (like 192.168.5.25).
Not really. IIRC, the ssh client will report "connection refused" if a tcp RST packet is sent back. If the host is powered off (or does not exist), it's not going to be sending back any response on its own.
 
Old 08-17-2009, 07:19 PM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
well according to the ping above the fedora host 192.168.5.2 does exist and is powered on but ssh returns 'no route to host'
the hosts 192.168.5.3 and 192.168.5.4 do not exist and appropriately return 'no route to host'.

also the router 192.168.5.1 and the knoppix host 192.168.5.25 return the expected error
'connection refused' because their ssh servers are not on.

on the flip side this is what i get when trying to ssh from the fedora machine to the knoppix machine
Code:
[fedora@localhost ~]$ ssh 192.168.5.1
ssh: connect to host 192.168.5.1 port 22: Connection refused
[fedora@localhost ~]$ ssh 192.168.5.2
ssh: connect to host 192.168.5.2 port 22: Connection refused
[fedora@localhost ~]$ 
[fedora@localhost ~]$ ssh 192.168.5.3
ssh: connect to host 192.168.5.3 port 22: No route to host
[fedora@localhost ~]$ ssh 192.168.5.4
ssh: connect to host 192.168.5.4 port 22: No route to host
[fedora@localhost ~]$ ssh 192.168.5.25
ssh: connect to host 192.168.5.25 port 22: Connection refused
 
Old 08-17-2009, 08:01 PM   #4
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 263

Rep: Reputation: 59
Probably either firewall or selinux issue.

I think the gui tool is called system-config-firewall and there, you should be able to allow ssh connections. (That is, on the Fedora machine, run the command, as root or with root privilege, system-config-firewall.

I think it blocks ssh by default.
 
1 members found this post helpful.
Old 08-17-2009, 08:36 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
^ that did it. this was hard to debug because not much info could be obtained from sshd -d -d -d or ssh -v -v -v.

also nothing checked in on /var/log/messages .
 
Old 08-17-2009, 10:42 PM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
That makes sense if your iptables INPUT chain terminated with REJECT --reject-with icmp-host-unreachable or similar... Silly me.
 
  


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
College Campus: PC on ethernet, Laptop on wifi, no static IP, can I still ssh? Romanus81 Linux - Wireless Networking 1 09-02-2008 10:52 AM
Can't ssh, ping, etc. laptop with wireless nic geronimo9 Linux - Wireless Networking 3 11-29-2006 06:34 AM
Automatic SSH tunnel for laptop ming0 Linux - Networking 1 02-26-2005 12:00 AM
Apache, SSh, Webmin, stops when laptop standby carlosruiz Linux - Laptop and Netbook 1 03-13-2004 06:33 AM
Cannot ssh into my laptop kayhan Linux - Newbie 7 10-15-2002 08:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:03 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