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

I ssh to amazon instance with putty but it hangs for a while when I type commands or when it sends commands to the instance. What's the problem with putty? I need help urgently.

share|improve this question

migrated from stackoverflow.com Mar 27 '10 at 4:04

This question came from our site for professional and enthusiast programmers.

    
This is something that should be posted on server fault. This has nothing to do with programming. –  Silmaril89 Mar 27 '10 at 4:04
1  
Actually, I would say superuser would be a better place since it's about using an application. –  Xeoncross Mar 27 '10 at 17:55
    
But it's a network problem, not a generic "how do I use putty" request. –  grawity Mar 27 '10 at 19:22

5 Answers 5

PuTTY, like any other SSH client, does not work well when the Internet connection has high latency. It could be one of many problems along the route such as a badly configured wireless link. Or it could be caused by higher priority network traffic somewhere on the route between the hosts.

Ping the remote host. If any of the replies are lost, or take longer than 1000ms, then that is the problem. If the ping time is good and you are still experiencing delays then the problem is probably in the remote host - they might be executing a data backup or the processor could be overloaded for some other reason.

share|improve this answer

In many cases when I've experienced slow SSH connections to a server, the problem was that the server could not do a DNS lookup on the client to ensure that the IP address from which the client is connecting matched the IP address returned from looking up the client's hostname in DNS. In that case the server waits for the DNS lookup to time out before it proceeds with the connection.

There are two possible ways to solve this:

  1. Put an entry in the server's /etc/hosts or server-side DNS config that would allow the server to resolve the client's hostname.

  2. Set UseDNS no in the server's sshd_config file so that the server does not perform a DNS lookup on the client.

See http://www.openssh.com/faq.html#3.3 for more info.

share|improve this answer
    
DNS problems will only affect connection set-up, not the responsiveness of an established connection. –  Phil P Mar 29 '10 at 23:46

It happens to me occassionally too. I don't think its necessarily related to Amazon. Are you using regular Putty or something like Putty Connection Manager?

share|improve this answer

Try using something like wondershaper on your router, to reduce SSH (small packets) latency.

share|improve this answer

You should install screen on the Amazon instance which would enable you to carry on working when the connection is being intermittent, this however doesn't really address why your losing connection

share|improve this answer

Your Answer

 
discard

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