Fix SSH port configuration in nx attach command - #141
Merged
Conversation
Update both SSH invocations in attach_to_job() to use custom ssh_port: - Screen ACL command (sudo screen -X acladd) - Screen attach command (screen -x) This ensures nx attach works with non-standard SSH ports. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nx attachto use custom SSH port configurationattach_to_job()functionProblem
After PR #140 added SSH port support, the
nx attachcommand was still hardcoded to use port 22, causing failures when connecting to remotes with non-standard SSH ports.Changes
File:
src/nexus/cli/jobs.pyLine 1258-1259: Added
-p {ssh_port}to screen ACL commandssh ... sudo -u nexus screen -X acladdLine 1280-1281: Added
-p {ssh_port}to screen attach commandssh -t ... screen -xImpact
Users can now successfully use
nx attachwith remotes configured on non-standard SSH ports (e.g., port 62420).Test Plan
nx attach <job_id>works with custom SSH portuv run pyrightto verify type safety (passes ✓)🤖 Generated with Claude Code