# Ssh Exec

> Run a single command on a remote Tailscale node via SSH without opening an interactive session.

- Skill: `kbarbel640-del/ssh-exec` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add kbarbel640-del/ssh-exec`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kbarbel640-del/ssh-exec/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: kbarbel640-del (https://skillmd.com/u/kbarbel640-del)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/kbarbel640-del/ssh-exec

---


# SSH Exec Skill

Run a single command on a remote Tailscale node via SSH without opening an interactive session. Requires SSH access to the target (key in `~/.ssh/` or `SSH_AUTH_SOCK`) and `SSH_TARGET` env var (e.g., `100.107.204.64:8022`).

## Execute a Remote Command

Run a command on the target and return stdout/stderr:

```bash
ssh -p 8022 user@100.107.204.64 "uname -a"
```

## Execute with Custom Port

Use the `SSH_TARGET` env var:

```bash
ssh -p "${SSH_PORT:-22}" "$SSH_HOST" "df -h"
```

## Run a Script Remotely

Pipe a local script to the remote host:

```bash
ssh -p 8022 user@100.107.204.64 'bash -s' < local-script.sh
```

