Mosh: Specify SSH listening port.

Created on 10 Apr 2012  路  5Comments  路  Source: mobile-shell/mosh

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.

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.

All 5 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

earlchew picture earlchew  路  5Comments

kotashiratsuka picture kotashiratsuka  路  3Comments

skrat picture skrat  路  4Comments

cshei picture cshei  路  5Comments

jscinoz picture jscinoz  路  7Comments