SSH Kerberos Ticket Forwarding
You set up ssh kerberos ticket forwarding by letting the client send a ticket to the remote host. Both the client and the remote server must allow GSSAPI delegation in their settings. Teams use this flow so engineers can hop from one server to another without typing passwords again. Still, forwarding a full ticket gives the remote host broad power to act as that user everywhere. How ssh kerberos ticket forwarding works in practice In a Kerberos setup, a user logs in once to get a main ticket
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You set up ssh kerberos ticket forwarding by letting the client send a ticket to the remote host. Both the client and the remote server must allow GSSAPI delegation in their settings. Teams use this flow so engineers can hop from one server to another without typing passwords again. Still, forwarding a full ticket gives the remote host broad power to act as that user everywhere.
How ssh kerberos ticket forwarding works in practice
In a Kerberos setup, a user logs in once to get a main ticket from the key server. When the user connects to a remote machine, the SSH client checks if delegation is on. If the client and server agree, the client asks the key server for a fresh forwarded ticket. It then sends this new ticket over the encrypted channel to the target machine.
The remote machine stores this ticket in a local cache file in memory or on disk. From that point on, any process running under that user account can read the ticket cache. The engineer can then jump from a bastion or jump host to another internal server. They can also reach internal file shares or databases that trust the same Kerberos realm.
Some teams pair Kerberos with OpenSSH certificates to manage host and user trust at scale. An OpenSSH certificate holds a public key, identity info, principal names, and options signed by a CA key. It uses a much simpler format than X.509 certificates, and it arrived in OpenSSH 5.4. Whether a team uses tickets or certificates, the goal is to cut down on static keys.
Security risks of forwarding tickets to remote hosts
Forwarding a Kerberos ticket solves the pain of typing passwords on every single hop. Yet it creates a major risk if an attacker compromises the remote host or bastion. Because the forwarded ticket sits on the remote server, a root user there can steal it. That attacker can then impersonate the engineer across every system that accepts the ticket.
Even without a breach, native ticket forwarding only decides who can log in to a machine. Once the session starts, the operating system treats every action from that user the same way. The ticket setup cannot see or control what individual commands the user runs inside the shell. If an engineer has a valid ticket and admin rights, they can drop tables or read secrets.
SSH Agent Forwarding Security + Security Ticket Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Also, standard SSH logs only record that a GSSAPI login took place and succeeded. They do not link each shell command or database query back to a central audit trail. Security teams end up knowing who entered the jump host, but not what happened next. Sensitive fields like emails, phone numbers, card numbers, or national IDs can spill into terminal output unchecked.
Limiting blast radius when engineers hop between servers
To reduce risk, admins first restrict which servers can receive a forwarded ticket. Engineers should never forward tickets to untrusted machines or shared test boxes with many root users. Teams also set short ticket lifetimes so stolen credentials expire after a few hours. Still, short lifetimes do not stop a bad command during an active session.
Real safety requires checking actions in flight rather than trusting a host with a delegable credential. When you separate login identity from raw credential storage on the target, you stop ticket theft. You also gain the ability to inspect commands and apply data masking to sensitive output fields.
Check SSH commands and file transfers on the host
OpenSSH keys and certificates decide who can log into a Linux host. They do not check what a one-shot command or file transfer does once the session starts. With hoop.dev, you run an open-source SSH server with guardrails on the host. It checks callers with OpenSSH certificates and works with ssh, sftp, scp, and rsync clients.
When a caller runs a one-shot command or moves a file, hoop.dev guardrails check the command or path before it runs. Then hoop.dev data masking masks matched sensitive patterns in downloads and output. Interactive shells carry no guardrails because keystrokes have no statement boundary. Teams can turn interactive shells off and allow only commands and file tasks. The audit trail logs who connected and what was allowed or refused, without storing keystrokes or file bytes. See the source on GitHub.
Frequently asked questions
What is the difference between SSH agent forwarding and Kerberos ticket forwarding?
SSH agent forwarding lets a remote host ask your local key agent to sign login challenges. Kerberos ticket forwarding sends an actual credential ticket file to sit on the remote server itself.
Why does my forwarded Kerberos ticket fail to work on the second hop?
The initial ticket might not be marked as forwardable by your central key server. Both the client config and the target server config must also allow GSSAPI credential delegation.
Is it safe to enable ticket forwarding for all hosts by default?
No, enabling it everywhere lets any compromised server steal your ticket and impersonate you across the network. You should only forward credentials to specific, trusted hosts when a workflow requires it.
Related guides
In this post