ssh_session
Manage persistent remote screen/tmux sessions for long-running tasks. Create, send commands, capture output, list, or kill sessions that survive SSH disconnects.
Instructions
Manage persistent screen/tmux sessions on the remote server for long-running interactive tasks (deploy, build, test, REPL). Sessions survive SSH disconnect. Actions: create (new detached session running a command), send (send keys/command to a session), capture (read current screen), list (list sessions), kill (kill a session).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | SSH server hostname or IP. Alternative to session_id/host_name, can override hosts.json entry. | |
| name | No | Session name. Required for create/send/capture/kill. Only letters, digits, _, ., - allowed. | |
| port | No | SSH port (used with host). | |
| lines | No | Number of lines to capture (tmux capture-pane -S). | |
| action | Yes | create=new detached session, send=send keys/command to a session, capture=read current screen content, list=list sessions, kill=kill a session. | |
| command | No | Command to run initially (create) or to send (send). | |
| password | No | SSH password (used with host). | |
| username | No | SSH username (used with host). | |
| host_name | No | Use a pre-configured host from hosts.json by name. Alternative to session_id. | |
| session_id | Yes | Active SSH session ID. If omitted, connects via name/host/env vars. | |
| session_type | No | Use screen or tmux backend. | screen |