Setting up Mosh (Mobile Shell) Server on Debian Squeeze
September 02, 2012
Jump To: « 1 2 View All »
My curiosity takes me to a bunch a different programs that I like to hack around with. Today it took me to setting up a Mosh Server. Mosh is a short term for Mobile Shell, which is attempting to act as an SSH (Secure Shell) replacement for a connection-less state. With Mosh, you are able to roam around on a 3G / 4G / Wifi / Work / Home and not have the need to always reconnect your SSH sessions or have a dedicated server setup with screen, which if that server goes down then you will have to reconnect all the sessions again! Setting up Mosh was an experience to say the least from outdated articles and not much information about Mosh given it’s age. If I have convinced you to try Mosh, or you were already convinced but have been having problems installing / compiling / running Mosh here is my guide to help you hack it together with some tricks I learned installing Mosh on Debian Squeeze.
Prior to installation of Mosh on Debian Squeeze, you will need to have apt-get a few items, and either get the source of Mosh, or perform a GIT checkout if you are feeling brave. As usual the # denotes a Root Shell (or use of sudo command) and $ denotes a regular shell.
# apt-get update
# apt-get install g++ protobuf-compiler libprotobuf-dev libboost-dev libutempter-dev libncurses5-dev zlib1g-dev expect-dev libexpect-perl liblocales-us-perl liblocales locales-all liblocale-us-perl liblocales-perl git libssl-dev
That command should install all the requirements for Mosh as of August 31st 2012. Once we have the requirements installed, it is time to start the tricky process of grabbing the source and compiling Mosh.
$ mkdir mosh
$ cd mosh
$ git clone https://github.com/keithw/mosh.git .
$ make -j 2
# make install
I choose to run from GIT, however you can choose to download the latest tar ball from the git downloads. Since Mosh is in it’s early stages I feel that running from source will provide easy upgrades instead of tricky upgrades, not to mention you get the latest bugfixes without waiting for a release. Now that we have Mosh installed we can attempt to start the Mosh Server.
$ mosh-server new
If that worked, (verify by doing a $ ps aux | grep mosh). Than you are ready to roll on that server. If it did not work, continue reading.
So Mosh did not work on the first attempt, of course not that would be way too easy for you! However, we can attempt to make it work for you. Since I am not all about just telling people how I hacked up a solution I will describe how I came to that tricky solution.
Jump To: « 1 2 View All »
Category: Linuxcompile, connection dedicated, debian, help, howto, Linux, mobile, mosh, replacement, secure, server, shell, squeeze, ssh