-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add SSH isolation support for remote command execution #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #31
Implements SSH isolation backend to execute commands on remote servers via SSH, similar to existing screen/tmux/docker isolation backends. Changes: - Add runInSsh() function in isolation.js with attached and detached modes - Add SSH to VALID_BACKENDS in args-parser.js - Add --host option parser for specifying SSH target - Update CLI to pass host option to isolation backend - Update help output and README.md with SSH examples - Add comprehensive unit tests for SSH isolation Implementation details: - Attached mode: Direct SSH connection with interactive session - Detached mode: Background execution using nohup on remote server - Requires --host option (e.g., [email protected]) - Supports custom session names via --session option Fixes #31 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
We should rename Think of the most reliable way possible to make sure we test everything. |
|
🤖 AI Work Session Started Starting automated work session at 2025-12-25T09:16:43.788Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
- Renamed --host option to --endpoint for better clarity (e.g., user@host format) - Added comprehensive SSH integration tests with local SSH server in CI - Updated GitHub Actions workflow to set up SSH server for Linux testing - Created test/ssh-integration.test.js for real SSH connection testing - Updated all documentation, tests, and code to use --endpoint 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
🤖 AI Work Session Started Starting automated work session at 2025-12-26T21:23:16.335Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
…-alive features Resolved merge conflicts by integrating SSH isolation support with newly added features from main: - User isolation (--isolated-user, --keep-user) - Keep-alive option (--keep-alive, -k) - Docker auto-remove (--auto-remove-docker-container) Changes: - README.md: Combined isolation options table with SSH endpoint - src/bin/cli.js: Merged SSH endpoint logging with user isolation logic - src/lib/args-parser.js: Added endpoint option alongside user isolation options - test/args-parser.test.js: Combined SSH endpoint tests with new feature tests All tests passing locally.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
Summary
This PR implements SSH isolation support for executing commands on remote servers via SSH, addressing issue #31.
The implementation follows the same pattern as existing isolation backends (screen, tmux, docker), providing a consistent user experience while enabling remote command execution.
Implementation Details
Core Features
runInSsh()function insrc/lib/isolation.jsnohupon remote server with log file capture--endpointCLI option to specify SSH target (e.g.,[email protected])--sessionoptionChanges Made
src/lib/isolation.js:runInSsh()function implementing both attached and detached modesrunIsolated()dispatcher to include SSH backendrunInSshin module exportssrc/lib/args-parser.js:sshtoVALID_BACKENDSarray--endpointoption parser (both--endpoint valueand--endpoint=valueformats)endpointproperty towrapperOptions--endpointwhen using SSH isolation--endpointis only used with SSHsrc/bin/cli.js:--endpointoption to help outputrunWithIsolation()to passendpointoption to isolation backendREADME.md:--endpointto Isolation Options tabletest/isolation.test.js:test/args-parser.test.js:--endpointoption parsing teststest/ssh-integration.test.js(new file):.github/workflows/release.yml:Usage Examples
Testing
All tests pass:
--endpointoption parsingNotes
openssh-clienton Debian/Ubuntu,opensshon macOS)/tmp/<session-name>.logon the remote serverFixes #31
🤖 Generated with Claude Code