[lug] can ping the host, but can't ssh for a few seconds

Vishal Verma stellarhopper at gmail.com
Tue Jul 10 10:29:31 MDT 2012


That is true! I didn't see the ssh error there.
In that case the only thing I can suggest is wireshark it :)

--
Vishal


On Tue, Jul 10, 2012 at 10:24 AM, David Ahern <dsahern at gmail.com> wrote:
> Seems like ssh is telling you as much as it can:
>
> "ssh: connect to host warsaw port 22: No route to host"
>
> That suggest a failure on connect() with errno EHOSTUNREACH. If it is on the
> same LAN, then wouldn't that be an ARP lookup failure?
>
> Does 'arp -n' show an entry for warsaw? Do all hosts agree on the netmask?
>
>
> On 7/10/12 10:05 AM, Vishal Verma wrote:
>>
>> Hi,
>>
>> I was about to suggest the same. Try -vvv for lots of debug, but it
>> will surely tell you at which point it fails.
>> You can also look at the server side log, in something like
>> /var/log/auth.log
>>
>> --
>> Vishal
>>
>>
>> On Tue, Jul 10, 2012 at 10:01 AM, Stephen Queen <svqueen at gmail.com> wrote:
>>>
>>> Maybe try the -v option of ssh on the first iteration, see if it gives
>>> you a hint why it is failing.
>>> [software at saratoga build-jaws-svn]$ date; ping -c 1 warsaw;
>>> /sbin/route; ssh -v software at warsaw
>>>
>>> Steve
>>>
>>> On 7/10/12, Michael Hirsch <mdhirsch at gmail.com> wrote:
>>>>
>>>> On Mon, Jul 9, 2012 at 1:29 PM, Ebben Aries <earies at dscp.org> wrote:
>>>>
>>>>> You are sending an echo req -> saratoga (localhost eth0 by the looks of
>>>>> it), yet following that w/ a connection attempt to warsaw - have a look
>>>>> at
>>>>> your arp cache for warsaw's address if it is on the same segment or
>>>>> your
>>>>> gw (192.168.1.1) if not.  Alter your ping statement to target warsaw
>>>>> rather
>>>>> to trigger an arp request prior to connection attempt. (which looks
>>>>> like
>>>>> what you were attempting to do in the first place)
>>>>>
>>>>
>>>> OMG, duh!  Don't know how I did that.  Obviously I should be pinging
>>>> warsaw.  Thanks for pointing it out.
>>>>
>>>> Unfortunately, it still behaves like that.  Here is the output of
>>>> pinging
>>>> warsaw, then trying to ssh there.  Then I wait a short time and try
>>>> again.
>>>> The second time it connects.  The route hasn't changed.
>>>>
>>>> [software at saratoga build-jaws-svn]$ date; ping -c 1 warsaw; /sbin/route;
>>>> ssh software at warsaw
>>>> Tue Jul 10 09:15:12 MDT 2012
>>>> PING warsaw.stirlingsystems.net (192.168.1.21) 56(84) bytes of data.
>>>> 64 bytes from warsaw.stirlingsystems.net (192.168.1.21): icmp_seq=0
>>>> ttl=64
>>>> time=4.54 ms
>>>>
>>>> --- warsaw.stirlingsystems.net ping statistics ---
>>>> 1 packets transmitted, 1 received, 0% packet loss, time 0ms
>>>> rtt min/avg/max/mdev = 4.546/4.546/4.546/0.000 ms, pipe 2
>>>> Kernel IP routing table
>>>> Destination     Gateway         Genmask         Flags Metric Ref    Use
>>>> Iface
>>>> 172.16.30.0     *               255.255.255.0   U     0      0        0
>>>> vmnet8
>>>> 192.168.137.0   *               255.255.255.0   U     0      0        0
>>>> vmnet1
>>>> 192.168.8.0     192.168.1.51    255.255.255.0   UG    0      0        0
>>>> eth0
>>>> 192.168.0.0     *               255.255.252.0   U     0      0        0
>>>> eth0
>>>> 169.254.0.0     *               255.255.0.0     U     0      0        0
>>>> eth0
>>>> default         192.168.1.1     0.0.0.0         UG    0      0        0
>>>> eth0
>>>> ssh: connect to host warsaw port 22: No route to host
>>>> [software at saratoga build-jaws-svn]$ date; ping -c 1 warsaw; /sbin/route;
>>>> ssh software at warsaw
>>>> Tue Jul 10 09:15:17 MDT 2012
>>>> PING warsaw.stirlingsystems.net (192.168.1.21) 56(84) bytes of data.
>>>> 64 bytes from warsaw.stirlingsystems.net (192.168.1.21): icmp_seq=0
>>>> ttl=64
>>>> time=0.196 ms
>>>>
>>>> --- warsaw.stirlingsystems.net ping statistics ---
>>>> 1 packets transmitted, 1 received, 0% packet loss, time 0ms
>>>> rtt min/avg/max/mdev = 0.196/0.196/0.196/0.000 ms, pipe 2
>>>> Kernel IP routing table
>>>> Destination     Gateway         Genmask         Flags Metric Ref    Use
>>>> Iface
>>>> 172.16.30.0     *               255.255.255.0   U     0      0        0
>>>> vmnet8
>>>> 192.168.137.0   *               255.255.255.0   U     0      0        0
>>>> vmnet1
>>>> 192.168.8.0     192.168.1.51    255.255.255.0   UG    0      0        0
>>>> eth0
>>>> 192.168.0.0     *               255.255.252.0   U     0      0        0
>>>> eth0
>>>> 169.254.0.0     *               255.255.0.0     U     0      0        0
>>>> eth0
>>>> default         192.168.1.1     0.0.0.0         UG    0      0        0
>>>> eth0
>>>> software at warsaw's password:
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Michael
>>>>
>>> _______________________________________________
>>> Web Page:  http://lug.boulder.co.us
>>> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>>> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>>
>> _______________________________________________
>> Web Page:  http://lug.boulder.co.us
>> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>>
>
>



More information about the LUG mailing list