How to use SSH with unstable internet connection?

Sometimes I have to use ssh over an unstable internet connection.

ping some.doma.in PING some.doma.in (xxxx): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 64 bytes from xxxx: icmp_seq=3 ttl=44 time=668.824 ms Request timeout for icmp_seq 4 Request timeout for icmp_seq 5 Request timeout for icmp_seq 6 Request timeout for icmp_seq 7 64 bytes from xxxx: icmp_seq=8 ttl=44 time=719.034 ms 

Is there a way to use tools to improve the reliability of tcp connections (primarily ssh)?

I imagine something like an SSH proxy running on a machine with a decent connection that will receive UDP packets, order them using a higher-level network protocol, redirect them to the target server using ssh and respond to the source.

Or are there any ssh command line commands to enable data redundancy or something else to avoid โ€œbroken pipesโ€?

Or perhaps a client-server application that uses the bittorrent network to distribute packages, and allows you to send commands to ssh back and forth. (= high latency but high reliability)

// I tried the screen and stuff, but sometimes the connection is too unreliable to work efficiently.

Greetings and thanks in advance!

+4
source share
1 answer

After some research and good luck, I came across mosh.

http://mosh.mit.edu

It's amazing. A client-server implementation using UDP and many small things (for example, echo prediction). Everyone should use it.

+8
source

Source: https://habr.com/ru/post/1500658/


All Articles