Richard Bucker

Getting mosh to build, deploy and run ... on OpenBSD, Ubuntu, OSX

Posted at — Mar 2, 2014

This was a pain in the ass but I’m glad I went through the process. In addition to my previous observations it also became apparent that Mosh is not running in userspace except on the server side depending on how it was installed on the server.Installing Mosh on OSX using homebrew seemed to have some subtle side-effects when using fishshell so I made certain I was using bash. Also, there was boost package conflict so I had to remove and reinstall it.About the only good news is that it installed flawlessly except that since it was installed with apt-get it was installed as root. I suppose if I had manually compiled I would have only marginally better results because the installation instructions want a “% make install” which is clearly being installed as root.Installing Mosh on my OpenBSD 5.3 machine was by far the longest, hardest, and time consuming. The biggest flaw appears to be that the installation instructions on the Mosh site missed a number of dependencies and exposed a number of packages that needed to be removed and reinstalled. And they also left out the necessary environment configurations needed for automake and autoconf. Finally, in order to install the program I noticed that I needed to install as root; which is contrary to the docs that say the service runs in userspace.sudo pkg_add http://ftp.openbsd.org/pub/OpenBSD/5.3/packages/amd64/protobuf-2.4.1.tgzsudo pkg_add http://ftp.openbsd.org/pub/OpenBSD/5.3/packages/amd64/autoconf-2.69p0.tgzsudo pkg_add http://ftp.openbsd.org/pub/OpenBSD/5.3/packages/amd64/autoconf-2.68.tgzsudo pkg_add http://ftp.openbsd.org/pub/OpenBSD/5.3/packages/amd64/automake-1.9.6p10.tgzexport AUTOCONF_VERSION=2.69export AUTOMAKE_VERSION=1.9./autogen.sh ./configure && makesudo make installMy biggest complaint is that Mosh’s own documentation recommends against UDP into production systems. (they loosened their stance on being more secure than SSH)Uninstalling could be a whole new set of pain.Side Note: as a system professional, part-time security analyst, and humble Mac user I constantly use the provided “terminal” application. I have also installed the 3rd party version called “iterm2”.  iterm2 is awesome but I have a number of long term concerns.  The first and foremost is the likelihood that someone, someday, will insert some sort of trojan and start farming my terminal passwords and terminal sessions to some remote point on the globe. The second pain point that I am addressing by using my iPad as a terminal is that just about every application I install on my OSX machine is being installed by the root user. (there are so may complications here)