Starting to type in PuTTY session before server responded

5

2

I often SSH to remote computers using PuTTY.

You know what really annoys me? Those 4-8 seconds from the moment I launch PuTTY to the moment the server responds with the prompt and I can start typing.

I wouldn't mind the wait, but unlike most other GUI/CLI interfaces, I can't type during the wait time! I want to be able to start typing stuff while I'm waiting for the server to respond, and then have the server execute the command when it's ready.

Possible? How?

Ram Rachum

Posted 2011-09-08T00:10:04.793

Reputation: 4 261

2I doubt it's possible to change this. Whenever I use PuTTY the server been quite quick to respond, so I can't even replicate your issue. – Stuart McLaughlin – 2011-09-08T14:23:55.077

2What @Ram details is correct (my server is slow as well). It's worth a note that if you type while the connection is being established, your command will be chopped as the server will not recieve your keyboard input until the connection is complete. However, you can type while a command is being executed and the prompt hasn't been returned, without any problems. – rlb.usa – 2011-09-08T19:04:01.437

I think your best bet here may be to simply keep your PuTTY window/connection open so you won't have to wait for it to connect so often. (unhelpful, I know) – rlb.usa – 2011-09-08T19:07:15.660

Answers

4

Things one could try to speed-up the connection :

  1. DNS Reverse Lookup settings generally cause SSH connections to be very slow and can take several seconds. If you can, put your client side IP address into the /etc/hosts file on the server.
  2. An alternative to the first point is to edit the SSH config file (/etc/ssh/sshd_config) and add a "UseDNS no" line (or change the existing one). Then restart sshd via sudo etc/init.d/ssh restart.
  3. Try using the IP address of the server instead of the server name
  4. For completeness, on Linux one could also check the order of the nameserver entries in /etc/resolve.conf.

If none of this helps, you could try turning on the Logging panel and see if there are any interesting messages in it.

harrymc

Posted 2011-09-08T00:10:04.793

Reputation: 306 093

3

Try to enable Local Echo and Local line editing.

gyger

Posted 2011-09-08T00:10:04.793

Reputation: 335

That solves the problem, but then Local Echo and Local Line Editing stay on during the entire session, which is really annoying. – Ram Rachum – 2011-09-17T13:18:29.893

That's true, but I think there is no Solution for this. – gyger – 2011-09-20T19:43:03.657

1

It might be trivial but what I suggest to do to limit this "discomfort" and to speed up putty a bit is to:

  1. open a notepad window and have your commands typed there.
  2. launch putty
  3. copy and paste your commands from notepad to putty window after the server starts to respond eventually.

Refineo

Posted 2011-09-08T00:10:04.793

Reputation: 111

0

Start by doing some packet captures from both ends. You won't be able to see the entire conversation, but you should be able to get the timing details of the session setup. Check to see if the server is doing anything like DNS lookup or running login scripts during that time.

Xenoactive

Posted 2011-09-08T00:10:04.793

Reputation: 992

-1

Use CygWin, it's even possible to use putty as your default cygwin terminal. With cygwin you have your good old openssh client back.

artistoex

Posted 2011-09-08T00:10:04.793

Reputation: 3 353