Teleport tsh
$ tsh Official High RiskTeleport tsh issues short-lived certificates for SSH hosts, Kubernetes clusters, databases, and internal apps. Read-only inventory commands support --format=json, while headless agents must authenticate via Machine ID identity files (-i) because interactive tsh login defaults to browser OIDC/SSO.
brew install teleport tsh negotiates ephemeral mTLS/SSH certificates and session recordings natively; wrapping remote SSH/DB tunnels in MCP adds latency and bypasses client-side cert caching.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Inventory commands support --format=json, though interactive tsh login triggers browser SSO unless a Machine ID -i identity file is supplied.
--format=jsononstatus,ls,kube ls, anddb ls- Browser SSO login flow unless using Machine ID
Short-lived certificates, RBAC, and central session recording provide strong governance, but remote tsh ssh / tsh db connect carry full remote execution risk.
- Ephemeral certs and audit recording; remote command execution possible
Prebuilt packages via brew install teleport and official installers across macOS, Linux, and Windows.
- Official multi-OS builds at goteleport.com/download/
Unifies SSH, Kubernetes, database, and app access behind one certificate-based CLI.
- Single client for multi-protocol zero-trust access
Actively maintained official client by Teleport with frequent security and feature releases.
- Official gravitational/teleport repository
Comprehensive CLI reference documenting flags, --format=json, and Machine ID headless setups.
- Official docs at goteleport.com/docs/reference/cli/tsh/
Security, Auth & Guardrails
Stores short-lived certificates and session state under ~/.tsh/.
Apache-2.0 client CLI; requires a Teleport Community or Enterprise cluster.
# Teleport tsh Agent Rules - Check `tsh status --format=json` first; never invoke interactive `tsh login` without `-i` Machine ID identity. - Do not open interactive `tsh ssh` shells; pass single bounded read-only remote commands explicitly.
Agent-Ready Command Recipes
Safe Read-Only Queries
tsh status --format=json
Outputs active proxy, logged-in user, roles, and certificate expiration as JSON.
tsh ls --format=json
Enumerates permitted SSH nodes, labels, and host UUIDs in machine-readable JSON.
Controlled Writes & Previews
tsh kube login my-cluster
Writes a short-lived Teleport-backed Kubernetes context into the local kubeconfig.
Strengths for Agents
- + Short-lived certificates and full session recording reduce long-lived key sprawl.
- + Consistent
--format=jsonontsh status,tsh ls, andtsh kube ls.
Caveats & Pitfalls
- ! Standard
tsh loginrequires interactive browser SSO and hardware/MFA prompts. - !
tsh sshopens interactive shells by default unless a remote command is passed.