Remote terminal access with tmate: Difference between revisions

From lechacal
Jump to navigation Jump to search
Line 8: Line 8:
Then generate keys. Press return when prompted.
Then generate keys. Press return when prompted.
  ssh-keygen -t rsa -b 4096
  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.<br>
Same thing when it asks for a password twice. Just press enter.
Run tmate
Run tmate
  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/E6etPMv44BeJJNBAWdRW37QVf
ssh session: ssh E6etPMv44BeJJNBAWdRW37QVf@lon1.tmate.io


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

Revision as of 21:35, 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.

Run tmate

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/E6etPMv44BeJJNBAWdRW37QVf
ssh session: ssh E6etPMv44BeJJNBAWdRW37QVf@lon1.tmate.io

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