9

I'm working with putty but have a slow connection to the server.

It's not slow everywhere and I don't need to get it faster. There is latency between when I type and when the text is displayed in the terminal.

So the question : how to work with putty without the delay between my typing and the text appearing in the terminal.

So I found this putty options : local echo and local line edit, but sure I can't use hotkeys with it. I need hotkeys so the subquestion is : How to make a hotkey to enable / disable local echo+line editing.

5
  • What do you mean by "It's not slow everywhere"?
    – Caleb
    Commented Aug 3, 2011 at 8:52
  • I mean I have no problems with reading output, I just need a hack to see what I type :)
    – cnd
    Commented Aug 3, 2011 at 9:08
  • 1
    Someone's talk about some "local echo" and "local line editing" configuration options. Commented Aug 3, 2011 at 9:28
  • @Stéphane Gimenez it's good, but I can't use hotkeys in this way. I need some easy way to turn it on/off
    – cnd
    Commented Aug 3, 2011 at 9:56
  • @nCdy: If your connection has big latency, everything that requires fetching information over the network will be slow. There is no way to go faster than light. If you just mean enabling/disabling local echo and edition, see putty's documentation maybe? Commented Aug 3, 2011 at 10:08

3 Answers 3

6

When typing in a shell over an SSH connection, every character you press needs to be sent to the remote side, interpreted, and sent back to be displayed if appropriate. This involves at least set of packets to make a round trip to and from your ssh server. If your network connection has a lot of latency, this can become quite noticeable. Even if the overall bandwidth is slow, if the latency is moderate it is usable, but if the round trip time starts growing typing becomes painful.

The only practical fix for this is to reduce the latency in the network connection. If this is not possible use a local shell and write scripts to be executed remotely rather than working directly on the remote machine.

3
  • Yes, that is exactly what I want to fix but fixing latency to another side of earth is not possible. I'm looking some trick to sent full commands there (not symbol by symbol). Are you sure there is no methods to get what I want ?
    – cnd
    Commented Aug 3, 2011 at 9:11
  • @nCdy: There are some tricks to do local line editing, but you loose the normal functionality of a shell like being able to do tab-complete. I'm not sure how this would be setup in Putty.
    – Caleb
    Commented Aug 3, 2011 at 9:23
  • 1
    @nCdy: I routinely work in SSH sessions to machines on the far side of the planet. The latency is observable but not a barrier to work. The only times I have an issue are when using a cell connection or congested network that has QOS problems. What ARE your round trip ping times to your SSH server?
    – Caleb
    Commented Aug 3, 2011 at 12:42
3

Depending on what you need to do you could either use emacs tramp (which is hard to learn if you are not an emacs user). Or you could ssh into a local (fast) linux server and use sshfs to mount the remote filesystem there. Then you could do file editing with local commands.

I have to say that I never had the problem too slow a connection, ever. Maybe you should just get used to typing blind.

1

You can't fix the latency problem, but you can try and guess what the server's response will be. For editing on the command line, this is often pretty easy.

Check out Mosh

Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes.

When Mosh is "guessing" it underlines the text to let you know that it may change.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .