Configuring Break Glass Root Access via SSH in the Event of Teleport Agent or Control Plane Failure #48033
Replies: 3 comments 2 replies
-
|
Hey @deusxanima Thanks for this one Is it an approved method by the team ? All security aspect of using this in production have been tested ? Regards |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Zathiel , meant to reply last week but fat-fingered it. After some discussion internally we've agreed to take this guide, clean it up some more, add a few additional caveats, and publish it as part of our official documentation to address your questions. |
Beta Was this translation helpful? Give feedback.
-
|
This process is now officially documented here: https://goteleport.com/docs/zero-trust-access/deploy-a-cluster/reliability/breakglass-access/ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Edit 2025-01-13: This process is now officially documented here!
https://goteleport.com/docs/zero-trust-access/deploy-a-cluster/reliability/breakglass-access/
This guide will walk you through configuring "break glass" access to your servers via SSH, to be used in emergency scenarios when:
Prerequisites:
tctladmin tool andtshclient tool. Visit Teleport Installation for instructions.sshd) version 7.4 or above.Step 1/5. Configure sshd to trust the Teleport CA
For break glass access, the OpenSSH server must be configured to trust client certificates issued by the Teleport Certificate Authority (CA).
On the OpenSSH server, run the following command. Replace
proxy.example.comwith the address of your Teleport Proxy Service:Make the public key accessible to sshd:
Restart the sshd service:
Now,
sshdwill trust users who present a Teleport-issued SSH certificate.Step 2/5. Create a limited
breakglassuser on OpenSSH serverbreakglassuser:Set a password for breakglass when prompted.
Add the following line to allow the
breakglassuser to run only specific commands with sudo (e.g.,cat,ls,journalctl, andsystemctl):ALL: This allows the rule to apply on all hosts (for local systems, this will be fine).(ALL): This allows the user to run the commands as any user (typically root by default).The paths of the commands (
/bin/cat,/bin/ls,/bin/journalctl,/bin/systemctl) must be exact and point to the full binary locations.If you're using
nanoas your sudo editor, pressCtrl+X, thenY, and pressEnter.Step 3/5. Create breakglass role & user in Teleport
breakglassTeleport role:Define the role in a file named breakglass-role.yaml
Create the role by applying with:
breakglassTeleport user:We don't need to worry about setting a password for this user as it'll only ever be used in the context of OpenSSH break glass authentication.
impersonatepermissions tosshcert issuer user:To avoid having to directly log into Teleport as
breakglass, grantimpersonationpermissions to an admin or automation user:Step 4/5. Generate
breakglassssh key and certRun the following after logging into Teleport via
tsh loginas the impersonating user:This command will create an ssh private key and a Teleport CA-signed certificate to be used by your client when authenticating with the OpenSSH server.
Store the private key securely, such as in a vault, only access if needed to implement break glass procedures. Rotate both keys and certificates regularly.
Step 5/5: Access OpenSSH server using Teleport CA
~/.ssh/config(or equivalent), making sure to update with your HostName and cert paths:Host sshd-server HostName sshd-server.example.com User breakglass IdentityFile /secure/path/breakglass CertificateFile /secure/path/breakglass-cert.pubNow, you can securely access the OpenSSH server using the
breakglassuser:The method described above ensures you can securely access your servers in emergency scenarios using the Teleport CA, even if Teleport's agents or control plane are down.
Beta Was this translation helpful? Give feedback.
All reactions