mosh-like port forwarding

This is on linux, connecting to linux servers:

I love mosh, but it doesn't support port forwarding, and likely won't for a while since it's been almost a year now and it hasn't happened yet.

port forwarding over ssh is great, but because my laptop moves between networks several times a day, my ssh sessions die, and so do the port forwards.

I could script/hack something to detect hung ssh and reconnect to get my port forwards back, but before I do this, is there another way to do long lasting port forwards when your source IP changes several times daily (because you go on different networks)?

I'm thinking an ssh over UDP would do the trick but of course ssh is over TCP.


You could try tinc: http://www.tinc-vpn.org/ which would let you connect directly despite the changing IPs.


MOSH will never have PortForwarding because it does not work at the same level, it synchronizes the display of the client console with the server console with SSP (State Synchronization Protocol), it does not transmit real data

but you can use AutoSsh instead of SSH, is the same goes with connection monitoring and automatic reconnection

and if you want limit bandwith you can add trickle

sudo trickle -d 10 -u 10 -- autossh -F /path/to/config-file site1

like an open project : MAST (warning is very old!)