Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I got a very strange thing going on. I connect to a remote Ubuntu via ssh, which also runs a simple website (apache). Every now and then the ssh connection terminates and then I cannot connect to the machine with ssh for like an hour or so (sometimes less).

My client machine is a home PC (Win7 64 bit).

Now, the weird part is that while I cannot connect with ssh from my home PC, I still see the web server working fine and I can connect to it on ports 80/443. On top of that, I can connect to other machines with ssh, so it's not my client machine that's somehow blocking this port.

What I actually end up doing is connect to another linux server, and then connect from it to my problematic server - and that works.

Weird wild stuff. The people hosting my server say they can reach it fine as well with ssh and the auth.log in the machine doesn't show even an attempt from my PC. So it really sounds like a network issue, but something between the hosting provider's network and my network.

tracert shows that the machine is indeed reachable during this "outage". telnet server 22 just hangs, no connection at all.

I've no idea how to debug this. Bottom line is that from time to time my ssh sessions hang and I just have to wait (or use a proxy) until it magically comes back on.

Ideas?

(someone suggested I disable TCPKeepAlive in putty, but it's already turned off)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You could gain some insight by watching the network traffic. Use this on your server:

sudo tcpdump -i your_interface -s 0 -w your_dumpfile

Then transfer the dumpfile back, open it with a packet analyzer (I use wireshark for this) and look for anomalies.

Does your ssh connection reach the server? Is there some package sent back?

share|improve this answer
    
I'll try this next time I experience downtime, thanks. –  Assaf Lavie Nov 30 '10 at 17:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.