0%

Install Mosh

  • What is Mosh
  • How to install mosh server
  • How to login server over mosh
  • How to add private key for auto-login

What is Mosh

Mosh is a replacement for SSH. Mosh runs the mosh-server remotely and connects to it over UDP.

How to install mosh server

Mac

1
brew install mobile-shell

Windows
Mosh haven’t native mosh client in Windows. You can install Chrome extensions or install mosh on cygwin.

  1. Download Chrome Extensions

  2. Install mosh on cygwin

    1
    C:\setup.exe -q mobile-shell

    How to login over mosh

    Use Chrome extensions to login the server

![](/images/mosh-chrome.jpg)

How to add private key for auto-login

Create a private key for accessing the system. Recommend to set up passphrase for protecting private key.

1
$ ssh-keygen -t rsa

Copy public key to authorized_keys

1
2
3
4
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ chmod 400 ~/.ssh/authorized_keys
Optional
$ rm ~/.ssh/id_rsa.pub

Copy private key into mosh client.

1
$ cat ~/.ssh/id_rsa

Click ‘Add ssh key’ to insert private key.

![](/images/add-ssh-key.jpg)