Skip to content

Instantly share code, notes, and snippets.

@pesblog
Created July 15, 2013 13:08
Show Gist options
  • Save pesblog/5999802 to your computer and use it in GitHub Desktop.
Save pesblog/5999802 to your computer and use it in GitHub Desktop.
mosh install to AWS EC2 (Amazon AMI)
#!/bin/sh
sudo yum -y install autoconf automake gcc gcc-c++ make boost-devel zlib-devel ncurses-devel protobuf-devel openssl-devel
cd /usr/local/src
sudo wget http://mosh.mit.edu/mosh-1.2.4.tar.gz
sudo tar xvf mosh-1.2.4.tar.gz
cd mosh-1.2.4
sudo ./autogen.sh
sudo ./configure
sudo make
sudo make install
@georgesamy
Copy link

georgesamy commented May 8, 2017

or you could just:
sudo yum install mosh
also, don't forget to open UDP ports 60000–61000 on the ec2 firewall.

@scuba-tech
Copy link

or you could just:
sudo yum install mosh
also, don't forget to open UDP ports 60000–61000 on the ec2 firewall.

Just a head's up, that no longer seems to work for Amazon AMIs/Amazon Linux 2:

sudo yum install mosh
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package mosh available.
Error: Nothing to do

@factoidforrest
Copy link

Yeah there is no mosh package on amazon linux anymore. this script is great. Big brain is to curl this and pipe it to shell for a one off install. Just need to update the mosh version, at 1.3.2 as of this comment

@pafmaf
Copy link

pafmaf commented Apr 18, 2023

sudo yum -y install autoconf automake gcc gcc-c++ make boost-devel zlib-devel ncurses-devel protobuf-devel openssl-devel perl-diagnostics
cd /usr/local/src
sudo wget https://mosh.org/mosh-1.4.0.tar.gz
sudo tar xvf mosh-1.4.0.tar.gz
cd mosh-1.4.0
sudo ./configure
sudo make
sudo make install

was missing perl-diagnostics

@Sija
Copy link

Sija commented Jun 5, 2023

You need to install the Amazon Linux Extras beforehand:

sudo amazon-linux-extras install epel
sudo yum install mosh

@Sija
Copy link

Sija commented Jun 5, 2023

Or even better, see: mobile-shell/mosh#1026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment