4

I'm on a bit of a travel binge at the moment, and unfortunately that finds me using some of the worse WI-FI connections I've ever seen; periodic disappearance and reappearance, highly variable throughput, etc.

I can deal with that on the web-browser side, but a lot of my work is done over ssh. I already use screen to maintain persistent processes once I make the first hop, and can quickly resume work after the first-hop connection dies, but is there anything I can do with this first hop ssh connection to let it cope more gracefully with spotty connections?

2 Answers 2

3

I was also facing this issue and tried searching for it. I came across this answer on StackOverflow.

Mosh mentioned in the answer works like a charm. Just keep in mind you'll need to install mosh on both server and client and then enjoy :)

Instead of using ssh, using mosh should help here as it doesn't break connection even on an unstable connection

PS: I know this question is really old but writing it here, in case someone stumbles over it in search of a solution.

2
  • Can you edit your answer to include the relevant information here please? Thanks :)
    – bertieb
    Sep 6, 2018 at 12:33
  • 1
    I feel the answer is explanatory enough. I have modified it a bit but let me know if you feel we can add some other information. Sep 7, 2018 at 6:26
1

If it is only the link-layer of the connection that is sloppy, you could disable KeepAlive and give your connection a better chance to recover from long stalls. This may not work well if you are behind NAT or get assigned changing addresses.

In the generic case, I find it simpler to just use a VPN such as OpenVPN. All the applications running on the static internal address become oblivious to disconnection problems.

You must log in to answer this question.

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