Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use SSH with an unstable internet connection?

Sometimes, I'm forced to use ssh over an unstable internet connection.

ping some.doma.in
PING some.doma.in (x.x.x.x): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
64 bytes from x.x.x.x: 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 x.x.x.x: icmp_seq=8 ttl=44 time=719.034 ms

Is there a way to use tools to increase the reliability of tcp connections (above all ssh)?

I imagine something like an SSH proxy, that runs on a machine with a decent connection, that will receive UDP packets, order them using a higher network layer protocol, forward them to the destination server using ssh and reply to the origin.

Or are there any ssh command line switches to enable more data redundancy or anything else to avoid "broken pipes"?

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

// I tried screen and stuff but sometimes the connection is just too unreliable to enable efficient working.

Cheers and thx in advance!

like image 652
dav1d Avatar asked Sep 05 '13 06:09

dav1d


People also ask

How do you deal with an unstable internet connection?

Check your network connection The first thing to do to make sure you have a stable Internet connection is to restart or unplug your modem and router. If there are any pending router firmware updates, install them on your device.

Can you use SSH without internet?

An internet connection is not required to SSH into your device, unless you are trying to do it through the internet! Fixed spelling and grammar.

Does SSH work on internet?

SSH also refers to the suite of utilities that implement the SSH protocol. Secure Shell provides strong password authentication and public key authentication, as well as encrypted data communications between two computers connecting over an open network, such as the internet.

How do I connect to the internet using SSH?

Access a restricted internet resource from inside a firewall using SSH port forwarding. Set up a SOCKS proxy server for the local machine. Set up an SSH reverse tunnel to bypass firewall protection to access an SSH server inside a private network.


1 Answers

After some more research and some luck, I stumbled upon mosh.

http://mosh.mit.edu

It's amazing. A client-server implementation using UDP and lots of small little things (like echo prediction). Everyone should use it.

like image 76
dav1d Avatar answered Sep 23 '22 09:09

dav1d