I have my server listening to SSH on a port other than 22. It doesn't seem there's a way to tell mosh that, even with the -p switch. It'd be nice to have an option to specify it. Here's what I get:
$ mosh franz@server -p 6003
/usr/local/bin/mosh: connect to host [ip here] port 22: Connection refused
ssh_exchange_identification: Connection closed by remote host
/usr/local/bin/mosh: Did not find mosh server startup message.
The -p parameter is specifing the udp port for the upgraded mosh connection. Maybe we can get a -P to specify the ssh port. :)
Thanks, merging with #53 but we will do this in a future release.
As of c1c102ff07394da79f9dee838c3e0cd8c3d1e3f1 you can now use mosh --ssh="ssh -p 12345"
. This will be in the next release.
Or if you don't want to wait, you can simply use
mosh -p MOSH_PORT "user@server SSH_PORT"
I thought this was the proper way... works with mosh 1.1.2.
there is a workaround:
for now, try setting a custom port in .ssh/config
Most helpful comment
Or if you don't want to wait, you can simply use
mosh -p MOSH_PORT "user@server SSH_PORT"
I thought this was the proper way... works with mosh 1.1.2.