I have a reverse SSH tunnel setup between bigbox and jump so that I can login into bigbox from where ever (it is behind a firewall) by using jump as a middle man. This works fine: I just ssh bigbox from my laptop and presto, I am in.
Now, I want to use mosh to reduce lag, but I am not sure how to get it working. I have no experience with Mosh from earlier. I basically want to use SSH to setup the initial connection using my configuration and then leave it to Mosh.
Unsurprisingly, neither doing mosh bigbox nor mosh --ssh="ssh bigbox" localhost did work:
$ mosh bigbox
/opt/homebrew/bin/mosh: Could not connect to localhost, last tried ::1: Connection refused
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535
/opt/homebrew/bin/mosh: Did not find remote IP address (is SSH ProxyCommand disabled?).
Here is my config:
~/.ssh/config
Host jump
HostName jump.somedomain.com
User jumpuser
# https://unix.stackexchange.com/questions/693885/hardening-reverse-ssh-tunnel-via-jump-host/693886#693886
Host bigbox
ProxyJump jump
User my_user
# Using a reversed SSH tunnel
HostName localhost
Port 20001