Configuring Break Glass Root Access via SSH in the Event of Teleport Agent or Control Plane Failure #48033
deusxanima
started this conversation in
Show and tell
Replies: 2 comments 1 reply
-
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.
0 replies
-
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.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This guide will walk you through configuring "break glass" access to your servers via SSH, to be used in emergency scenarios when:
Prerequisites:
tctl
admin tool andtsh
client 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.com
with the address of your Teleport Proxy Service:Make the public key accessible to sshd:
Restart the sshd service:
Now,
sshd
will trust users who present a Teleport-issued SSH certificate.Step 2/5. Create a limited
breakglass
user on OpenSSH serverbreakglass
user:Set a password for breakglass when prompted.
Add the following line to allow the
breakglass
user 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
nano
as your sudo editor, pressCtrl+X
, thenY
, and pressEnter
.Step 3/5. Create breakglass role & user in Teleport
breakglass
Teleport role:Define the role in a file named breakglass-role.yaml
Create the role by applying with:
breakglass
Teleport 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.
impersonate
permissions tossh
cert issuer user:To avoid having to directly log into Teleport as
breakglass
, grantimpersonation
permissions to an admin or automation user:Step 4/5. Generate
breakglass
ssh key and certRun the following after logging into Teleport via
tsh login
as 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:Now, you can securely access the OpenSSH server using the
breakglass
user: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