MOSH host on OS X

There is a great tool called Mobile Shell (mosh) that makes your SSH fast as a light.

It works great on both NIX and OS X systems but there is one sad thing that it can’t run as host on OS X “from the box” when you installing it via homebrew.

themengzor@AZ-MacBook ~$ mosh OSXhost
bash: mosh-server: command not found
Connection to OSXhost closed.
/usr/local/bin/mosh: Did not find mosh server startup message.

Everything because of $PATH variable. To fix that you must put /usr/local/bin in your $PATH variable in ~/.bashrc file:


Mount SSHFS on OS X

If you want to have a fast and secure method to work with filesystem on remote machine that has only SSH you can choose SSHFS.

Installing SSHFS on OS X Yosemite is easy — use Homebrew to install OSXFuse and SSHFS:

brew install Caskroom/cask/osxfuse
brew install sshfs

Use this command to mount root volume of remote host (remotehost:/) to your local folder /Users/me/host and also create a volume with name LocalVolumeName. It will automagically reconnect on network fails and SSH timeout.

sshfs user@remotehost:/ /Users/me/host/ -o reconnect,follow_symlinks,volname="LocalVolumeName"

You will be asked for a password of the remote system and if you don’t want do enter that password each time you can setup SSH passwordless login.

To get your remote filesystem faster you can create simple BASH script:

sshfs user@remotehost:/ /Users/me/host/ -o reconnect,follow_symlinks,volname="LocalVolumeName"

Save that as and give it execute permission:

chmod +x ./

After that you can launch your script from Terminal or Finder.
Actually, you can name it as you want (even DestroyEarth).