keithw/mosh — Issue #24: mosh script interacts badly with ControlMaster
Author: ebroder
Created: 2012-02-21 23:01:36+00:00
State: open

I'm not sure exactly what's going on, but I use ControlMaster to avoid establishing multiple connections to a server. If I have an open ssh connection to a server (and therefore an active ControlMaster socket), starting mosh fails:

evan@warwick:~$ ssh -N broder@spock.tribbl.es

evan@warwick:~$ ls .ssh
authorized_keys id_dsa known_hosts
authorized_keys2 id_dsa.pub known_hosts.old
config id_rsa
control-broder@spock.tribbl.es:22 id_rsa.pub
evan@warwick:~$ mosh broder@spock.tribbl.es
/usr/bin/mosh: Did not find mosh server startup message.

The relevant portion of .ssh/config is:

Host *
ControlPath ~/.ssh/control-%r@%h:%p
ControlMaster auto
ControlPersist 1