Install Teleport on Ubuntu 22.04

“Teleport serves as an access layer and certification authority for your infrastructure. With Teleport, you can set up single sign-on so you can access your SSH servers, Kubernetes, databases, desktops, and web apps from a single location. You can use your preferred programming language to define access policies for your infrastructure. In addition, you can share and record interactive sessions in all configuration environments.

Teleport supports both Linux and macOS distributions, so you can install both the master server and the clients. If we talk about Windows, it offers more limited support. However, it provides the ability to install client packages on Windows operating systems.”

In this article you will learn how to install the teleport on the Ubuntu 22.04 LTS distribution.

Steps to Install Teleport on Ubuntu 22.04

Follow these steps to install Teleport on Ubuntu 22.04 system:

Step 1: Download the GPG signing key for the teleport repository

Teleport is not included in the default Ubuntu 22.04 apt repository. Therefore, you need to import Teleport repository GPG key to install Teleport on Ubuntu 22.04 LTS. Use this command to download the teleport repository public gpg key:

$ sudo curl https://deb.releases.teleport.dev/teleport-pubkey.asc -O /etc/Split/keyrings/Teleport Archive Keyring.asc

Step 2: Add Teleport Repository

Next, add the teleport repository to your system with this command:

$ echo “deb [signed-by=/usr/share/keyrings/teleport-archive-keyring.asc] https://deb.releases.teleport.dev/ stable main”

| sudo tea /Etc/suitable/Sources.List.d/teleport.list > /developer/zero

Step 3: Update the apt repository

Update the system package index with the following command:

$ sudo appropriate update

Step 4: Install Teleport on Ubuntu 22.04

Now your system is ready to install Teleport on an Ubuntu 22.04 system with this command:

$ sudo Install apt get teleport

How to configure teleport on Ubuntu 22.04?

Since security is an essential factor of Teleport, we need to take a few steps before using it.

Generate SSL Certificate

We must first generate our certificates using the “OpenSSL” command.

$ openssl req -x509 -Node -new key RS:4096

-key off /Var/lib/teleport/teleport.key

-out /Var/lib/teleport/teleport/teleport.pem -sha256 -days 3650

-subj/C=US/ST= New York/L= New York/O= City website/OU=org/CN=linuxhint-demo.com”

Replace “linuhint.com” and the remaining certificate parameters such as “country, state, locale” and “company name” with your domain name.

Generate Teleport configuration file

After configuring the domain name and generating an SSL certificate, use the following command to create a configuration file to run Teleport:

Configure teleport -O /Etc/teleport.yaml

–cluster-name=linuxhint-demo.com

–public-address=teleport.linuxhint-demo.com:443

–cert file=/Var/lib/teleport/teleport.pem

–key-file=/Var/lib/teleport/teleport.key

You can view the contents of the teleport configuration to run this command:

$ Cat /Etc/teleport.yaml

After setting up all the configurations, use the following commands to enable and start the teleport service on Ubuntu 22.04:

$ sudo systemctl enable –now teleport

$ sudo Systemctl status teleport

Now create a new user and assign some roles:

$ sudo tctl user add city – Roll=Editor, access

You can also add more roles and assign permissions as follows:

$ sudo tctl user add a city – Roll=editor,access – Registrations=root,ubuntu,atown,user

You will end up with the following output on your terminal:

Access the Teleport web console

Ensure that the firewall for the external access port should be open. The link to use to enter Teleport and create a new account will be provided to you. There is an expiration limit of 1 hour.

The following screen will appear after you log in.

To improve security, you need to create a password and scan a QR code to get the login code. Once the account is set up, you can start working.

Conclusion

We learned how to install Teleport on Ubuntu 22.04 LTS distribution in this article. With the help of the wonderful tool Teleport we can quickly visualize a server infrastructure. We can be sure of the security of this application since it is one of its main features. You can explore more features of Teleport from here official documentation.

Related Posts