Remote terminal access with tmate: Difference between revisions

From lechacal
Jump to navigation Jump to search
(Created page with "==tmate== tmate is a great tool to remotely let access to someone else ina terminal. This particularly useful for third party support. To allow access on a terminal on the r...")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
==tmate==
==tmate==
tmate is a great tool to remotely let access to someone else ina terminal. This particularly useful for third party support.
tmate is a great tool to remotely let access to someone else in a terminal. This is particularly useful for third party support.


To allow access on a terminal on the raspberrypi follow these steps below.
To allow access on a terminal on the raspberrypi follow these steps below.
Line 6: Line 6:
First install tmate
First install tmate
  sudo apt-get install tmate
  sudo apt-get install tmate
Then generate keys. Press return when prompt.
Then generate keys. Press return when prompted.
  ssh-keygen -t rsa -b 4096
  ssh-keygen -t rsa -b 4096
Run tmate
 
The prompt below will appear:
Enter file in which to save the key (/home/pie/.ssh/id_rsa):
Just press enter without giving any input.<br>
Same thing when it asks for a password twice. Just press enter. (or do enter a password if you wish)
 
Run with the command below
  tmate
  tmate


At the bottom of the terminal an address will appear. Give this address to anyone you are allowing the access to the terminal.
The following text will appear in the terminal
 
Tip: if you wish to use tmate only for remote access, run: tmate -F                                            [0/0]
To see the following messages again, run in a tmate session: tmate show-messages
Press <q> or <ctrl-c> to continue
---------------------------------------------------------------------
Connecting to ssh.tmate.io...
Note: clear your terminal before sharing readonly access
web session read only: https://tmate.io/t/ro-VgDuCGGwrGrwm6u2jnzsQX5Pt
ssh session read only: ssh ro-VgDuCGGwrGrwm6u2jnzsQX5Pt@lon1.tmate.io
web session: https://tmate.io/t/E6etPMv44BeJJNBAWdRW37QVd
ssh session: ssh E6etPMv44BeJJNBAWdRW37QVd@lon1.tmate.io


[[File:Screenshot_2021-03-08_16-28-28.png | 300px]]
Copy and paste this content to whom you wish offering access.

Latest revision as of 21:39, 26 September 2022

tmate

tmate is a great tool to remotely let access to someone else in a terminal. This is particularly useful for third party support.

To allow access on a terminal on the raspberrypi follow these steps below.

First install tmate

sudo apt-get install tmate

Then generate keys. Press return when prompted.

ssh-keygen -t rsa -b 4096

The prompt below will appear:

Enter file in which to save the key (/home/pie/.ssh/id_rsa):

Just press enter without giving any input.
Same thing when it asks for a password twice. Just press enter. (or do enter a password if you wish)

Run with the command below

tmate

The following text will appear in the terminal

Tip: if you wish to use tmate only for remote access, run: tmate -F                                            [0/0]
To see the following messages again, run in a tmate session: tmate show-messages
Press  or <ctrl-c> to continue
---------------------------------------------------------------------
Connecting to ssh.tmate.io...
Note: clear your terminal before sharing readonly access
web session read only: https://tmate.io/t/ro-VgDuCGGwrGrwm6u2jnzsQX5Pt
ssh session read only: ssh ro-VgDuCGGwrGrwm6u2jnzsQX5Pt@lon1.tmate.io
web session: https://tmate.io/t/E6etPMv44BeJJNBAWdRW37QVd
ssh session: ssh E6etPMv44BeJJNBAWdRW37QVd@lon1.tmate.io

Copy and paste this content to whom you wish offering access.