-
Notifications
You must be signed in to change notification settings - Fork 23
SSH support #2
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
base: main
Are you sure you want to change the base?
SSH support #2
Conversation
| Port uint16 | ||
| } | ||
|
|
||
| func resolveIP(target string) (net.IP, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an edge case here for IPv6 I think. Line 23: currIp.To4()
./oneshell -s pitest.lan --bypass-ssh-sanity-check
2024/07/30 20:06:55 Port not specified in ssh config, using 22
2024/07/30 20:06:55 Target unspecified, using public IP: <redacted IPv6>
2024/07/30 20:06:55 error occurred when listening: failed to resolve hostname <redacted IPv6>
./oneshell -s pitest.lan
2024/07/30 20:13:41 Port not specified in ssh config, using 22
2024/07/30 20:13:41 Testing connection to SSH server to ensure SSH port forward works...
2024/07/30 20:13:41 Target unspecified, using public IP: <redacted IPv6>
2024/07/30 20:13:41 error occurred when listening: failed to resolve hostname <redacted IPv6>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good point, however I'm not sure if I want to support IPv6 yet as it would require a fair amount of work changing the assembly code to be able to handle it. I might raise a Github issue for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that makes sense. I should have clarified, I believe the issue is that with both IPv4 (private) and IPv6 (public) addresses assigned to my RPI network interfaces it failed. Didn't debug too much but there might be a way to check for this.
This feature adds the ability to listen on a port on a remote SSH machine instead of the local machine.