Tmate | Share Your Linux Terminal

Windows Articles

Install GLPI with Lighttpd on Ubuntu 20.04

Ubuntu 20.04 is a very popular distribution on servers because it is quite stable and offers commercial support. That is why it...

How to install Lighttpd on Ubuntu 20.04?

There are many web services in Unix but we always look for the one that best suits our needs. In this case,...

How to install Docker on Ubuntu 20.04 / Debian 10?

Docker is a fairly popular technology in today's sysadmin. It is logical to think because it means a complete change in the way images...

How to install Mantis Bug Tracker on Ubuntu 20.04?

Hi, folks. In this post, I will help you to install Mantis Bug Tracker on Ubuntu 20.04 If you...

How to install WordPress with Nginx on Ubuntu 20.04?

Hi, folks. In this post, we will help you install Wordpress with Nginx on Ubuntu 20.04. It's a lot easier than you...
Muhammad Nabeel
Muhammad Nabeel
Network and System Administrator

tmate stands for teammates, it is just like teamviewer. It is fork of tmux and used for instant terminal sharing. It can share a terminal with single or multiple teammates.

How tmate works?
When launching tmate, an ssh session is established to tmate.io (backend servers maintained by tmate developers) in the background through libssh. Once connection is established, a 150 bits session token ID is generated by local server for each session. Finally teammates connect to tmate.io server using the SSH session token ID.

Prerequisites:
You must generate ssh key on your server, where you want to install tmate.

Install Tmate in Linux

On most Linux distributions, Tmate can be installed from the default repositories.

For Debian and Ubuntu-based run following commands to install Tmate.

apt-get install software-properties-common
add-apt-repository ppa:tmate.io/archive 
apt-get update 
apt-get install tmate


Run below command for Tmate installation on FreeBSD

pkg install tmate


Run below command for Tmate installation on FreeBSD

pkg_add tmate


On Arch Linux, Run below command for Tmate installation

yaourt -S tmate


On Gento, run emerge commandv to install it.

emerge tmate


On Fedora use following command to install Tmate.

dnf install tmate

For CentOS and RHEL you need to follow below steps to install Tmate.

Step 1: Create Yum repository

Run below command

vi /etc/yum.repos.d/tmate.repo

And add below text in tmate.repo file

[osradar-tmate-repo]
name=osradar tmate repo
baseurl=http://li.nux.ro/download/nux/dextop/el7/x86_64/
gpgcheck=0
enabled=1

Now save changes and exit.

Step 2: Install Tmate on CentOS

Run below command

yum install tmate -y

Once you installed Tmate on your desired Linux distribution, launch Tmate by running the following command from your Terminal

tmate

After launching tmate, an SSH session token ID will be generated (In my case it is ckWOyq06o1M5zGIICwMAVUSdJ@am2.tmate.io ). You need to share it with your mates so that they can access your terminal.

To access your server terminal, your mate will need to open his/her terminal and run below command.

ssh ckWOyq06o1M5zGIICwMAVUSdJ@am2.tmate.io

You can use below command to see tmate stats

tmate show-messages

To exit from a session, type exit

exit

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Install GLPI with Lighttpd on Ubuntu 20.04

Ubuntu 20.04 is a very popular distribution on servers because it is quite stable and offers commercial support. That is why it...

How to install Lighttpd on Ubuntu 20.04?

There are many web services in Unix but we always look for the one that best suits our needs. In this case,...

How to install Docker on Ubuntu 20.04 / Debian 10?

Docker is a fairly popular technology in today's sysadmin. It is logical to think because it means a complete change in the way images...

How to install Mantis Bug Tracker on Ubuntu 20.04?

Hi, folks. In this post, I will help you to install Mantis Bug Tracker on Ubuntu 20.04 If you...

How to install WordPress with Nginx on Ubuntu 20.04?

Hi, folks. In this post, we will help you install Wordpress with Nginx on Ubuntu 20.04. It's a lot easier than you...