Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Tmate-slave on Ubuntu 16.04

Install dependincies

apt-get install  git-core build-essential pkg-config libtool libevent-dev libncurses-dev zlib1g-dev automake libssh-dev cmake ruby

Install msgpack >= 1.2.0

git clone
cd msgpack-c
cmake .
sudo make install

Install newer libssh >= 0.7.0

sudo add-apt-repository ppa:kedazo/libssh-0.7.x
sudo apt-get update
sudo apt-get install libssh-4

Compile tmate-slave

git clone
cd tmate-slave

Run tmate-slave

# NOW, tmate-slave is ready, let's run it and listen to port 2222. 

# This will generate SSH keys, REMEMBER the keys fingerprints, you need those later in `~/.tmate.conf` settings
# Those keys are stored under directory ./keys
sudo sighup ./tmate-slave -p 2222 -k /etc/tmate-slave-keys

Then follow the instruction from of the "Host your own tmate server" to setup the ~/.tmate.conf to use your own tmate-slave server on Ubuntu.

Make the tmate-slave run as a service

Setup systemd (/etc/systemd/system/tmate-slave.service)



ExecStart=/home/ubuntu/tmate-slave/tmate-slave -p 2222 -k /home/ubuntu/tmate-slave/keys

Enable/Start service

sudo systemctl daemon-reload
sudo systemctl enable tmate-slave
sudo systemctl start tmate-slave

You can check the status using systemctl status tmate-slave

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