remote management with teleport

Опубликовано: 24 Октябрь 2024
на канале: Heikki Koivisto
330
2

The last time I checked a remote management tool called Rport, which is good and easy to use, the two-factor authentication was a lack of options. So what no check remote management with teleport too.

Links: https://goteleport.com/docs/installation

commands

sudo curl https://deb.releases.teleport.dev/tel... -o /usr/share/keyrings/teleport-archive-keyring.asc

echo "deb signed-by=/usr/share/keyrings/teleport-archive-keyring.asc https://deb.releases.teleport.dev/ stable main" | sudo tee /etc/apt/sources.list.d/teleport.list to /dev/null

sudo apt-get update && sudo apt install teleport -y

sudo chmod 755 -R /var/lib/teleport/

sudo teleport configure --acme [email protected] --cluster-name=tele.example.com -o file

OR self-signed

openssl req -x509 -nodes -newkey rsa:4096 \
-keyout /var/lib/teleport/teleport.key \
-out /var/lib/teleport/teleport.pem -sha256 -days 365 \
-subj "/C=FI/ST=Uusimaa/L=Helsinki/O=Company Name/OU=Org/CN=*.domain.com"

Generate Teleport configuration file

teleport configure -o /etc/teleport.yaml \
--cluster-name=domain.com \
--public-addr=domain.com:443 \
--cert-file=/var/lib/teleport/teleport.pem \
--key-file=/var/lib/teleport/teleport.key

sudo teleport configure --test /etc/teleport.yaml

Enable and start service:
sudo systemctl enable --now teleport
sudo systemctl start teleport

Add first user:
sudo tctl users add admin-user --roles=editor,access --logins=root,user