apt-get install git-core build-essential pkg-config libtool libevent-dev libncurses-dev zlib1g-dev automake libssh-dev cmake ruby
git clone https://github.com/msgpack/msgpack-c.git
cd msgpack-c
cmake .
make
sudo make install
sudo add-apt-repository ppa:kedazo/libssh-0.7.x
sudo apt-get update
sudo apt-get install libssh-4
git clone https://github.com/tmate-io/tmate-slave.git
cd tmate-slave
./autogen.sh
./configure
make
# 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
./create_keys.sh
sudo sighup ./tmate-slave -p 2222 -k /etc/tmate-slave-keys
Then follow the instruction from https://tmate.io/ of the "Host your own tmate server" to setup the ~/.tmate.conf
to use your own tmate-slave server on Ubuntu.
[Install]
WantedBy=multi-user.target
[Unit]
Description=Tmate-Slave
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
Restart=always
User=root
ExecStart=/home/ubuntu/tmate-slave/tmate-slave -p 2222 -k /home/ubuntu/tmate-slave/keys
sudo systemctl daemon-reload
sudo systemctl enable tmate-slave
sudo systemctl start tmate-slave
You can check the status using systemctl status tmate-slave