Skip to content

Instantly share code, notes, and snippets.

@rwuwon
rwuwon / mosh.md
Last active August 22, 2022 19:21
Connect to a Google Cloud Compute Engine using Mosh (mobile shell)

Connect to a Google Cloud Compute Engine using Mosh (mobile shell)

Mosh is a great way to overcome lag and flakey connection issues when accessing remote terminals over SSH: https://mosh.org/

Unfortunately, there's still not a lot of clear documentation for "idiots" because a lot of the existing guides assume a) "it just works", or b) you're already skilled enough to set everything up from scratch (assumed knowledge/use cases).

One of the problems I ran into for quite a long time yesterday was getting the darn thing to connect to my Google Cloud instance. I kept running into the mosh: Nothing received from server on UDP port 60001. [To quit: Ctrl-^ .] error (by the way - to quit, you have to press . after Ctrl-^ - it's not just Ctrl-^, there is a dot there too!)

FAQs and the like made vague spartan references to NATs, firewalls, iptables and the like and I tried out various commands and configurations on the se