Skip to content

Conversation

@danieltanto
Copy link
Contributor

This feature adds the ability to listen on a port on a remote SSH machine instead of the local machine.

Port uint16
}

func resolveIP(target string) (net.IP, error) {
Copy link

@ben-tanto ben-tanto Jul 30, 2024

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>

Copy link
Contributor Author

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

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.

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.

2 participants