Install
openclaw skills install ssh-opUse the ssh-op helper script to load an SSH private key from 1Password (op) into an in-memory ssh-agent and then run ssh. Use when connecting to hosts that r...
openclaw skills install ssh-opssh-op is a wrapper around ssh that:
ssh-agent exists for the current shellop read ... | ssh-add -execs ssh with your argumentsFail-fast checks you can run:
command -v op ssh ssh-agent ssh-add
op whoami
If op whoami fails:
OP_SERVICE_ACCOUNT_TOKEN is set.Machine-specific config lives alongside the skill:
~/.openclaw/skills/ssh-op/config.env.example~/.openclaw/skills/ssh-op/config.envRequired keys:
SSH_OP_VAULT_NAME — 1Password vault containing the keySSH_OP_ITEM_TITLE — 1Password item titleOptional keys:
SSH_OP_KEY_FIELD — defaults to private keySSH_OP_KEY_FINGERPRINT_SHA256 — if set, skip re-loading when already in ssh-agentSSH_OP_HOSTS_FILE — defaults to hosts.conf (ssh config snippet filename)SSH host entries (optional) live in:
~/.openclaw/skills/ssh-op/hosts.confBecause the primary interface is chat (Telegram), the preferred onboarding flow is:
config.env.ssh-op --help and a safe ssh-op -T <alias>).If you are running in a real terminal, you can use the interactive onboarding script:
~/.openclaw/skills/ssh-op/scripts/onboard.sh
(If you want a step-by-step runbook, see references/onboarding.md.)
Canonical executable lives inside the skill:
~/.openclaw/skills/ssh-op/scripts/ssh-opFor convenience, create a symlink:
mkdir -p ~/.local/bin
ln -sf ~/.openclaw/skills/ssh-op/scripts/ssh-op ~/.local/bin/ssh-op
Run onboarding to populate the real config:
~/.openclaw/skills/ssh-op/scripts/onboard.sh
(Or edit config.env manually and set SSH_OP_VAULT_NAME / SSH_OP_ITEM_TITLE.)
Then validate:
ssh-op --help
# try a safe ssh command (or any host alias you have configured)
ssh-op -T <host-alias>
Host entries in hosts.conf~/.openclaw/skills/ssh-op/scripts/ensure_ssh_config.py
This will update ~/.ssh/config between:
# BEGIN ssh-op (managed)# END ssh-op (managed)ssh-op <ssh-args...>
Examples:
ssh-op my-host-alias
ssh-op -T my-host-alias
ssh-op -L 8080:localhost:8080 my-host-alias
ssh-agent lifetime is tied to the current shell unless you export SSH_AUTH_SOCK / SSH_AGENT_PID.scripts/ssh-op).~/.local/bin/ssh-op) for convenience.