# Ssh Async

> Maintain persistent asynchronous SSH sessions with bidirectional input/output across multiple commands. Use when an agent must keep an SSH shell open, send commands incrementally, inspect prompts or streamed output, reuse one authenticated connection for a task, or safely start/stop a long-lived remote session for debugging, administration, deployment, log inspection, or interactive line-based wo…

- **Type:** Skill
- **Install:** `agentstack add skill-02loveslollipop-opencrow-ssh-async`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [02loveslollipop](https://agentstack.voostack.com/s/02loveslollipop)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [02loveslollipop](https://github.com/02loveslollipop)
- **Source:** https://github.com/02loveslollipop/OpenCROW/tree/main/skills/ssh-async

## Install

```sh
agentstack add skill-02loveslollipop-opencrow-ssh-async
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# OpenCROW I/O - SSH Async

## Runtime preflight

Probe required commands with `command -v` and Python modules with `importlib.util.find_spec` before use. Prefer a PATH-resolved OpenCROW MCP helper or the `ctf`/`sage` environment when available, then the managed helper or system Python. If a capability is missing, stop that path safely and report the exact missing command or module.

Prefer the `opencrow-ssh-mcp` server for session lifecycle, reads, and writes. Fall back to `scripts/sshx` only when you need to inspect or debug the backend directly.

## MCP First

- Use `toolbox_info`, `toolbox_verify`, and `toolbox_capabilities` first.
- Use the generic session tools:
  - `session_start`
  - `session_send`
  - `session_read`
  - `session_status`
  - `session_stop`
- Keep one named session per host/task flow so the MCP server can return stable artifacts under `/tmp/opencrow-ssh-async//`.

Use `scripts/sshx` to manage long-lived SSH sessions instead of one-shot `ssh` invocations when you are operating outside MCP.

## Workflow

1. Start a named session to a remote host.
2. Send shell input while the daemon keeps receiving remote output asynchronously.
3. Read logs with `--tail` for recent context or `--follow` for streaming output.
4. Stop the session explicitly when done.

## Commands

```bash
# Start an interactive login shell
scripts/sshx start --name demo --host 10.0.0.5 --user ubuntu

# Start with a specific identity file and port
scripts/sshx start --name prod --host prod.example.com --user deploy --port 2222 \
  --identity ~/.ssh/deploy_ed25519

# Send a command to the open shell
scripts/sshx send --name prod --data 'uname -a' --newline

# Read recent output
scripts/sshx read --name prod --tail 60

# Follow output live
scripts/sshx read --name prod --follow

# Inspect metadata and process state
scripts/sshx status --name prod

# Stop the session
scripts/sshx stop --name prod
```

## Operational Rules

- Use one session per host/task flow so prompts, working directory, and shell state stay coherent.
- Prefer key-based authentication. The helper runs `ssh` in batch mode and will fail fast instead of hanging on password prompts.
- Append `--newline` for normal shell commands.
- Read with `--tail` before `--follow` so prompt/output context is visible first.
- Stop sessions explicitly to avoid leaving remote shells running.
- If `status` reports `running: false`, inspect `daemon.log` and `io.log` before restarting.

## Files and State

Session state lives at `/tmp/opencrow-ssh-async//`:

- `io.log`: timestamped TX/RX events with escaped control characters
- `rx.raw`: raw PTY output bytes from the SSH session
- `daemon.log`: daemon stdout/stderr and launcher failures
- `meta.json`: target metadata and SSH arguments
- `pid`: daemon PID

## Limitations

- This tool is designed for line-oriented shell workflows, not full-screen TUIs such as `vim`, `top`, or `less`.
- Password, OTP, and passphrase prompts are not supported because the session daemon is intentionally non-interactive during startup.
- If the remote command disables prompts or uses unusual terminal control sequences, inspect `rx.raw` in addition to `io.log`.

## References

- For usage patterns and recovery steps, read `references/patterns.md`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [02loveslollipop](https://github.com/02loveslollipop)
- **Source:** [02loveslollipop/OpenCROW](https://github.com/02loveslollipop/OpenCROW)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-02loveslollipop-opencrow-ssh-async
- Seller: https://agentstack.voostack.com/s/02loveslollipop
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
