Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Teleport tsh

$ tsh Official High Risk
Teleport · Security & Secrets · Apache-2.0 · macos / linux / windows

Teleport 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.

FCRS-1.0 Score
81 /100
Good
Medium Confidence
Zero-Friction Install
brew install teleport
CLI vs MCP Decision CLI Preferred vs MCP

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

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Inventory commands support --format=json, though interactive tsh login triggers browser SSO unless a Machine ID -i identity file is supplied.

  • --format=json on status, ls, kube ls, and db ls
  • Browser SSO login flow unless using Machine ID
Trust & Safety 18 / 25

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
Setup & Portability 13 / 15

Prebuilt packages via brew install teleport and official installers across macOS, Linux, and Windows.

  • Official multi-OS builds at goteleport.com/download/
Utility & Efficiency 13 / 15

Unifies SSH, Kubernetes, database, and app access behind one certificate-based CLI.

  • Single client for multi-protocol zero-trust access
Maintenance & Lineage 9 / 10

Actively maintained official client by Teleport with frequent security and feature releases.

  • Official gravitational/teleport repository
Docs & Verifiability 9 / 10

Comprehensive CLI reference documenting flags, --format=json, and Machine ID headless setups.

  • Official docs at goteleport.com/docs/reference/cli/tsh/

Security, Auth & Guardrails

Auth Modes
OAuth Browser Service Account Config File
Credential Storage

Stores short-lived certificates and session state under ~/.tsh/.

Side Effects
Read-Only Remote Write
Cost & Quotas

Apache-2.0 client CLI; requires a Teleport Community or Enterprise cluster.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Inspect current Teleport session and certificates
tsh status --format=json

Outputs active proxy, logged-in user, roles, and certificate expiration as JSON.

List accessible SSH nodes as JSON
tsh ls --format=json

Enumerates permitted SSH nodes, labels, and host UUIDs in machine-readable JSON.

Controlled Writes & Previews

Configure kubeconfig for a Teleport-managed cluster
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=json on tsh status, tsh ls, and tsh kube ls.

Caveats & Pitfalls

  • ! Standard tsh login requires interactive browser SSO and hardware/MFA prompts.
  • ! tsh ssh opens interactive shells by default unless a remote command is passed.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI