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

cd /tmp
git clone

Install newer libssh >= 0.7.0

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

Compile tmate-slave

cd /tmp
git clone && cd tmate-slave
./ && ./configure && make
mv tmate-slave /usr/local/bin/.
mv keys /etc/tmate-slave-keys
/usr/local/bin/tmate-slave -p 2222 -k /etc/tmate-slave-keys


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



ExecStart=/usr/local/bin/tmate-slave -p 2222 -k /etc/tmate-slave-keys -h HOST

Enable/Start service

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

Add iptables

iptables -I INPUT -p tcp --dport PORT -m state --state NEW,ESTABLISHED -j ACCEPT

This comment has been minimized.

Copy link

commented Nov 3, 2017

Thanks for writing this up! This worked almost perfectly for me on 17.10 as well!

Three things of note:

  1. In dependencies I had to add: sudo apt-get install libmsgpack-dev
  2. The directions for installing msgpack aren't quite right. This worked for me:
cd /tmp
git clone
cd msgpack-c
cmake .
sudo make install
  1. On Ubuntu 17.10 it wasn't necessary to upgrade LibSSH, for whatever that's worth :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.