← 返回
安全合规 中文

Teleport tsh SSH (Identity-First SSH Access, no passwords/static keys)

Use Teleport tsh CLI with a Machine ID (tbot) identity file to SSH into Teleport-managed hosts or run remote commands through Teleport access controls. Trigg...
使用tbot机器ID身份文件配合tsh CLI,通过Teleport访问控制SSH登录托管主机或执行远程命令。
webvictim
安全合规 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 518
下载
💾 1
安装
1
版本
#latest

概述

teleport-tsh-ssh

Use this skill to access Teleport SSH nodes via tsh with an explicit identity file (-i) and persistent proxy selection.

Pair this with teleport-tbot-bootstrap to set up and persist the local Machine ID identity source.

Compatibility

Tested against Teleport/tsh/tbot 18.7.0.

Identity policy (required)

Always pass -i to tsh commands.

Default identity path:

  • ~/.openclaw/workspace/tbot/identity

If the default does not exist, discover a workspace identity file and use the best match.

Identity discovery fallback

When default identity is missing, search within workspace for candidate files named like:

  • identity
  • *.identity
  • tbot/identity

Validate candidate format before use. A valid Teleport Machine ID identity file typically contains multiple blocks, such as:

  • -----BEGIN PRIVATE KEY-----
  • an OpenSSH user cert line (*-cert-v01@openssh.com ...)
  • one or more -----BEGIN CERTIFICATE----- blocks

Pick the most likely current file (prefer paths under tbot/, then newest mtime).

Security notes

  • Never commit identity files, bot state directories, tokens, or registration secrets.
  • Prefer explicit paths and least-privilege role mappings for automation identities.

Known limitations (v1.0.0)

  • Focuses on Teleport SSH node access (tsh ssh, tsh ls, tsh scp).
  • Does not cover Teleport app/db/kubernetes access workflows.

Proxy resolution (required)

Resolve proxy in this order:

  1. If TELEPORT_PROXY is set, use it.
  2. Else, read saved proxy from ~/.openclaw/workspace/tbot/proxy (single-line text file) if present.
  3. Else, prompt user for Teleport proxy address, then save it to ~/.openclaw/workspace/tbot/proxy for future runs.

Always include proxy in commands when resolved:

  • tsh -i --proxy= ...

Quick workflow

  1. Confirm tsh is installed.
  2. Resolve identity file path (default first, then fallback discovery).
  3. If no valid identity file is found, prompt user to provide the identity file path.
  4. Resolve proxy (TELEPORT_PROXY first, then saved proxy file, then prompt-and-save).
  5. Check auth status when useful: tsh -i --proxy= status.
  6. Discover hosts if needed: tsh -i --proxy= ls.
  7. Connect/run command with explicit identity:
    • tsh -i --proxy= ssh
    • tsh -i --proxy= ssh -- [args...]
  8. Return concise result + actionable error details.

Command patterns

  • Interactive shell:
  • tsh -i --proxy= ssh
  • Remote command execution:
  • tsh -i --proxy= ssh -- [args...]
  • Set remote login user:
  • tsh -i --proxy= ssh @
  • or tsh -i --proxy= ssh --login=
  • List available nodes:
  • tsh -i --proxy= ls

If user asks what nodes are available, run tsh ls with identity+proxy and report back.

Prefer non-interactive form when user asks for command output.

File copy with Teleport SCP

Use tsh scp with identity+proxy for file transfer. Syntax mirrors OpenSSH scp.

  • Local → remote:
  • tsh -i --proxy= scp :
  • Remote → local:
  • tsh -i --proxy= scp :

Troubleshooting checklist

  • tsh: command not found → install Teleport client.
  • Identity file missing/unreadable → resolve fallback file; if none found, ask user for path.
  • Missing proxy → ask user for proxy, save to ~/.openclaw/workspace/tbot/proxy, retry.
  • not logged in / cert expired → refresh Machine ID output (tbot service health).
  • access denied → role/login mismatch; verify host and identity origin.
  • host not found → verify with tsh -i --proxy= ls and cluster/proxy context.

Clawhub listing copy

Clawhub short description

Use tsh with explicit Machine ID identity (-i) for Teleport SSH, remote commands, node listing, and tsh scp.

Companion skill

Use with teleport-tbot-bootstrap to create and persist the local Machine ID identity source.

Clawhub long description

Standardize Teleport server access with identity-first command patterns.

Enforce explicit identity usage, resolve proxy consistently, support host discovery, command execution, and file transfer with practical troubleshooting guidance.

References

  • references/tsh-ssh-reference.md
  • https://goteleport.com/docs/reference/cli/tsh/#tsh-ssh

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 02:48 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,583
security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,694
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,210 📥 266,136