From reading about mosh, it seems to require a UDP connection, thus non-trivial routing. I forward ssh connections through ssh tunnels (sometime multiple layers), and it works great. Can mosh do that?
ssh beagle3@remote.host -t 'screen -x || screen'
And it works beautifully. (I'm heavy screen user, so even if I switch to mosh, there will be screen underneath...)What is a UDP connection?
Practiaclly, this means that if your server is behind a firewall or NAT, you need to poke a hole in your firewall to be able to connect with Mosh.
* There is no connection session, so you can close your laptop or put it to sleep and open it up again and the connection will still be there.
* You don't have the lag of sending and then responding, it appears locally immediately
* It is much easier to get UDP around firewalls and it can't be blocked easily in the same way most VPN protocols or SSH can. I have yet to find a network where I can't get my terminal UDP packets through.
The alternative to Mosh is setting up OpenVPN[1]. It is especially worthwhile if you have a network of public servers that you administer. It is easy to setup[2] and works on Windows, Mac, Linux, BSD etc.
The best tip is to add a second interface to all your machines and setup a private VLAN across them. This way if you are experiencing a DoS attack or high traffic you can still login and administer the machine (this also applies with standard ssh - you put it in a different range of IPs and on your public machines then only have 80 and 443 open).
EC2[3], Linode[4] et al all support adding a second network interface to each machine (or to just one of the machines, which is then used as a gateway to the remainder) which can be assigned an IP address in a different range. You then setup a separate hostname to this network, or even register a separate administrative domain name (eg. company-admin.com) which you keep on a different registrar, whois record, etc.
[2] http://openvpn.net/index.php/open-source/documentation/howto...
[3] http://aws.typepad.com/aws/2012/07/multiple-ip-addresses-for...
Err, not in my world. Many hotels block udp. Amtrak's on train internet does too (they block a lot of tcp ports as well, and proxy http to stop videos).
I haven't tried recently, but most guest networks (at conferences, companies I visited, etc) did not let UDP through.
I really can't say how much mosh has improved my work life. You owe it to yourself to give it a try.
Is that SOP for mosh, or do you guys proxy through a mosh-only server to your actual servers, or something else?
Opening a high port in the 60000s is less risky than 22. You should probably remap ssh to something else. Or you can use ec2 security groups to limit access to certain ips.
It also buffers all command output server-side and doesn't send more output than the network connection allows. This means that even if you have a runaway process dumping lots of output, you can still immediately Ctrl+C it.