Sample Header Ad - 728x90

Mosh with port forwarding (like SSH)

17 votes
4 answers
17943 views
When connecting to my development server via ssh, I can forward remote ports to local ports via: ssh my-user@example.com -L 5432:localhost:5432 However I'd rather use mosh because my connection tends to drop. I tried extending my usual mosh command (that works) with the --ssh parameter: mosh --ssh "ssh -L 5432:localhost:5432" my-user@example.com Which gets me connected without error - but doesn't do anything for my ports. **Is there a way to make port forwarding work when connecting via mosh?**
Asked by geberl (471 rep)
Apr 12, 2018, 09:39 AM
Last activity: Jun 30, 2024, 02:04 PM