What could be the cause of randomly getting “No route to host” errors when trying to ssh or sftp?

0

The computers are within the same network using WLAN.

The error doesn't always show. Sometimes I can connect without a fuss, and sometimes the error shows.

Randell

Posted 2010-01-11T23:51:34.077

Reputation: 1 153

How do I make sure that I have a static IP to connect to? How do I verify that the WiFi connection is up? Would checking out any website from a web browser do the trick? – Randell – 2010-02-14T19:36:13.010

And just after I posted this question, I was able to connect both through ssh and sftp. Weird. Any clues? – Randell – 2010-01-11T23:55:12.183

Are you connecting by IP or hostname? Are you sure that the machine you are connecting to isn't dropping it's wireless connection, perhaps due to something else such as a cordless phone or speaker? – ridogi – 2010-01-12T02:52:22.103

I'm connecting by IP. Both machines aren't dropping their wireless connections AFAIK. No cordless phones or speakers either. – Randell – 2010-01-12T04:22:12.757

Is there a firewall issue? I see this every now and then on my machine that is running Mobloquer (linux version of PeerGuardian). Do you have SNMP or any other monitoring to see if the connections themselves are dropping? – Steiv – 2010-01-12T05:29:43.150

Nothing that I'm aware of. – Randell – 2010-01-12T14:45:13.163

Make sure you have a static IP to connect to, and if possible verify that the WiFi connection is up when you are unable to ssh in. – ridogi – 2010-01-12T17:57:08.810

Answers

3

The Destination Host Unreachable from the PING, means that the ping fails (packet drop).

It would probably be one of

  1. Errourous IP-settings - If you can surf the internet intermettiantly, then this is not the problem. But if you cannot access anything this might be it.
  2. Weak Signal - Move your Computer/WLAN-card closer to the Access Point, or moving antennas to improve connectivity.
  3. Interference - Try changing the WLAN-channel in the Access Point/Router to something else. Also make shure there are no operating microwave ovens in the proximity. (Or anything else that operates at 2.4GHz)
  4. Sketchy Drivers - Update your WLAN-adapters drivers.
  5. Faulty Hardware - Try a different WLAN-adapter.

Gnutt

Posted 2010-01-11T23:51:34.077

Reputation: 183

1

WLAN is more unreliable than wired networks. It can drop packets without dropping the connection. Try to change which channel your network is running on.

To check if it's dropping packets you can have ping running in a window.

Jimmy Hedman

Posted 2010-01-11T23:51:34.077

Reputation: 886

How do I know which channel my network is running on? Ping returns Destination Host Unreachable. – Randell – 2010-02-14T19:34:33.200

On Linux you do "iwlist <interfacename> channel". It shows all available channels and what channel you are using. You change it on your router (or access point) and your client will follow. – Jimmy Hedman – 2010-02-23T19:53:28.923