How to ssh in the face of huge (30 second) latency? [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
开发者_如何转开发Closed 12 years ago.
Improve this questionI need to create an ssh connection between two Linux machines running Centos v5 but the latency could be as high as 30 seconds. I find that if I test something approaching this configuration artificially by simulating 7 seconds or more latency using:
tc qdisc add dev eth0 root netem delay 7s
When I try:
ssh -n -o ConnectTimeout=0 WilliamKF@centos5Machine whoami
It fails after about 1 min 23 sec with:
Connection closed by 10.35.50.114
Note that ConnectTimeout=0 means never timeout. Also, simulating a latency of 6 seconds results in a successful ssh after about 1 min 32 sec.
Is there anything I can do to get ssh to work in the face of extremely high latency on Linux? Why does ssh fail at this threshold
Have you ever tried using screen? When I have a bad connection that keeps disconnecting me I make sure I use it so I don't lose my terminal session.
http://www.rackaid.com/resources/linux-screen-tutorial-and-how-to/
精彩评论