https://tmate.io/
- Install tmate on the host machine
- Request an API key
- Follow instructions on the website to add API key information to
.tmate.conf
- Be sure to use a difficult session name as it is basically a plaintext password.
- Setup system service if the tmate session is to be started automatically as system starts
sudo cat > /etc/systemd/system/tmate.service << 'EOF'
[Install]
WantedBy=multi-user.target
[Unit]
Description=Tmate
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
Restart=always
User={___YOUR_USER_NAME____}
WorkingDirectory=/home/{___YOUR_USER_NAME____}
ExecStart=/usr/bin/tmate -F
EOF
sudo systemctl daemon-reload
sudo systemctl enable tmate
sudo systemctl start tmate
systemctl status tmate.service