2.5k
GitHub Stars
9
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill rssh2- _meta.json289 B
- index.js5.7 KB
- package-lock.json3.1 KB
- package.json426 B
- session-manager.js6.6 KB
- sftp-manager.js8.0 KB
- SKILL.md6.1 KB
- test.js2.1 KB
- tunnel-manager.js7.7 KB
Overview
This skill provides an SSH remote automation toolkit for session pooling, tunnel management, and SFTP file transfer. It focuses on stable, reusable SSH connections with automatic reconnection, command queuing, and concurrent control. Built to simplify remote operations, it supports local/remote/dynamic port forwarding and directory sync for deployments and backups.
How this skill works
The skill wraps ssh2 to manage persistent SSH sessions, a connection pool, and heartbeats to keep links alive. It exposes managers: SessionManager for pooled command execution, TunnelManager for local/remote/dynamic port forwarding, and SftpManager for upload/download/sync. Configurable timeouts, retries, and auto-reconnect ensure reliability in unstable networks.
When to use it
- Run remote maintenance commands across many hosts with pooled connections.
- Establish SSH tunnels for database access or secure proxying (local, remote, SOCKS).
- Automate file deployments, backups, and directory synchronization via SFTP.
- Execute concurrent operations with retry and timeout controls for batch jobs.
- Keep long-running or flaky connections alive with heartbeats and auto-reconnect.
Best practices
- Never hard-code passwords or private key contents; reference key file paths or environment variables.
- Use key-based authentication and restrict account privileges; avoid running as root when unnecessary.
- Set sensible command and connection timeouts to detect and recover from hangs.
- Limit connection pool and concurrency to match remote host capacity to avoid overload.
- Enable logging and audit trails for critical operations and use retry settings for transient failures.
Example use cases
- Remote operations: run system health checks, restart services, and collect logs across servers using pooled exec calls.
- Database tunneling: create a local tunnel to a remote database for secure, temporary access via localhost.
- File deployments: upload artifacts, run remote extract commands, and restart services as part of a CI/CD step.
- Directory sync: mirror local build directories to remote hosts with resume and file monitoring.
- Bulk administration: run concurrent commands across a fleet with controlled concurrency and aggregated results.
FAQ
Avoid embedding secrets. Use environment variables, reference private key file paths, and protect key files with appropriate filesystem permissions.
Can tunnels auto-reconnect if the network drops?
Yes. Tunnel creation supports autoReconnect with configurable reconnectDelay so tunnels will attempt to restore after transient disconnects.