NOTE: You don't need to compile Mosh on Cygwin yourself anymore; just install the package with Cygwin's setup.exe
.
-
Download Cygwin.
-
Run
setup.exe
and install the following packages in addition to the default ones:- make
- boost
- libncurses-devel
- pkg-config
- perl
-
Download and compile Protocol Buffers (make sure there are no spaces in the working directory when compiling Protocol Buffers,
make
will fail if there are):$ tar zxvf protobuf-2.4.1.tar.gz $ cd protobuf-2.4.1 $ ./configure $ make $ make install
-
Download and compile Mosh:
$ tar zxvf mosh-1.1.3.tar.gz $ cd mosh-1.1.3 $ ./configure CPPFLAGS="-I/usr/include/ncurses" PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ $ make $ make install
-
Install the
IO::Pty
Perl module:$ perl -MCPAN -e shell cpan> install IO::Pty
-
Rock’n’roll.
See notes here:
mobile-shell/mosh#164
The problem is that we weren't using mosh correctly. See below. You must log onto the remote host using SSH. Then start mosh-server. This in turn gen's a key and a port. See below. That was the fix for me. Also make sure that you have setup your iptables and/or firewall(s) to allow this traffic through.
Now I run on the server:
mosh-server
MOSH CONNECT 60001 qbE+SNhaEJpfzFpHcXBwkw
and on the client:
MOSH_KEY=qbE+SNhaEJpfzFpHcXBwkw mosh-client 60001