Teleport replaces traditional SSH key management with short-lived, certificate-based access. When you enroll a Linux server by running the Teleport SSH Service, the node joins your cluster through a reverse tunnel to the Teleport Proxy Service. From that point on, every SSH connection flows through Teleport’s RBAC engine, is backed by your identity provider, and is fully recorded in the audit log — no shared keys, no password sprawl, and no open inbound ports required.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/gravitational/teleport/llms.txt
Use this file to discover all available pages before exploring further.
How the Teleport SSH Service works
The Teleport SSH Service is a drop-in replacement forsshd. Instead of maintaining a registry of authorized public keys, Teleport issues short-lived SSH certificates signed by its own certificate authority. When a user runs tsh ssh, Teleport validates the certificate, checks the user’s roles, and proxies the session through an encrypted reverse tunnel that the node opened to the Proxy Service.
- No long-lived keys — certificates expire after a configurable TTL (default 12 hours).
- RBAC enforcement — roles control which OS logins a user may assume and which nodes they can reach.
- Session recording — every keystroke, command, and output can be replayed from the Web UI.
- Reverse tunnel — nodes need no inbound firewall rules; they call out to the Proxy.
Prerequisites
- A running Teleport cluster (cloud or self-hosted). See Deploy a Cluster if you don’t have one yet.
- A Linux host (Ubuntu, Debian, Amazon Linux, CentOS, RHEL, or similar) where you will run the SSH Service.
tctlauthenticated to your cluster with at leasteditorprivileges.
Enrolling a Linux server
Install Teleport on the node
Connect to the Linux host and install the Teleport binary. Use the same major version as your cluster.Verify the installation:
Create a join token
On your workstation (where Copy
tctl is configured), generate a short-lived token of type node. Pipe it to a file to avoid displaying it in your shell history.token.file to the Linux node (for example, with scp).Join tokens are single-use and expire after 30 minutes by default. Generate a new one if enrollment takes longer.
Generate the Teleport configuration
On the Linux node, use The resulting
teleport node configure to produce a ready-to-use teleport.yaml. Replace the --proxy flag with your cluster’s address.- Teleport Enterprise Cloud
- Self-Hosted
/etc/teleport.yaml enables only the SSH Service and disables all other services:Start the Teleport SSH Service
Enable and start Teleport via systemd so it restarts automatically on reboot:Check that the service is healthy:The node will appear in the Teleport Web UI under Resources within a few seconds.
Session recording
Everytsh ssh session is recorded by the Proxy Service (or the node itself in enhanced mode) and stored in the Teleport audit log. To replay a session:
- Open the Teleport Web UI.
- Navigate to Audit → Session Recordings.
- Click Play next to any recorded session.
Controlling access with RBAC
Teleport roles define which OS logins a user can request and which nodes they can access via label selectors. Here is a minimal role that allows a user to SSH asubuntu on nodes tagged env: production:
A user must have at least one allowed login that exists on the target node. Roles are additive for
allow rules and subtractive for deny rules across multiple assigned roles.Hardening the node
Once the SSH Service is enrolled and tested, you can close port 22 on your firewall. All SSH traffic will flow through the Teleport Proxy tunnel and you no longer need a direct inbound SSH path.Next steps
Access Controls & RBAC
Restrict which users can SSH into which nodes using labels and role templates.
Single Sign-On
Connect Teleport to Okta, GitHub, or any SAML/OIDC provider for SSO-backed SSH.
MFA for SSH
Require per-session MFA touches before a terminal opens.
tsh Reference
Complete reference for tsh ssh, tsh ls, and all other tsh subcommands.
