Skip to content

Add support for custom SSH ports in remote targets - #140

Merged
elyxlz merged 3 commits into
masterfrom
add-ssh-port-support
Nov 19, 2025
Merged

Add support for custom SSH ports in remote targets#140
elyxlz merged 3 commits into
masterfrom
add-ssh-port-support

Conversation

@elyxlz

@elyxlz elyxlz commented Nov 19, 2025

Copy link
Copy Markdown
Owner

Summary

  • Adds support for connecting to remote servers using non-standard SSH ports
  • Enables users to specify SSH port (e.g., 62420) during target setup
  • Maintains backward compatibility with default port 22

Changes

  • Config: Added ssh_port field to TargetConfig with default value 22
  • Tunnel Manager: Updated SSH tunnel creation to use -p flag with configured port
  • Setup Wizard: Added SSH port prompt during nx target add flow
  • Connection Testing: Updated SSH connection tests to use custom port
  • Error Messages: Improved error hints to show correct SSH command with port flag

Test Plan

  • Run nx target add and configure a remote with custom SSH port
  • Verify SSH connection test uses correct port
  • Verify tunnel creation works with non-standard ports
  • Verify existing configs without ssh_port default to port 22
  • Run uv run pyright to verify type safety (passes ✓)

Backward Compatibility

Existing target configurations without the ssh_port field will automatically use port 22 (standard SSH port), ensuring seamless operation for existing users.

🤖 Generated with Claude Code

elyxlz and others added 3 commits November 19, 2025 10:55
This change enables Nexus to connect to remote servers that use non-standard SSH ports (e.g., 62420 instead of the default 22).

Changes:
- Add ssh_port field to TargetConfig schema with default value 22
- Update SSH tunnel creation to include -p flag with configured port
- Add SSH port prompt to setup wizard for target configuration
- Update connection test commands to use custom SSH port
- Improve error messages to show correct ssh command with port flag

The implementation maintains backward compatibility - existing configs without ssh_port will default to port 22.

🤖 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>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@elyxlz
elyxlz merged commit bde5cff into master Nov 19, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant