-
Notifications
You must be signed in to change notification settings - Fork 0
Add the forward command to bmctool #12
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
For the local endpoint, the port is the remote endpoint port + 1.
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.
Reviewable status:
complete! 1 of 1 approvals obtained (waiting on @evfirerob and @stephen-soltesz)
cmd/forward.go, line 21 at r1 (raw file):
tunnelHost string defaultPorts = []string{"4443:443", "5900"}
From a usability perspective, I will personally always use "443:443" to prevent odd behavior from the drac web UI. But, for default settings this is probably right.
cmd/forward.go, line 130 at r1 (raw file):
log.Infof("Forwarding %s -> %s -> %s", localEndpoint, serverEndpoint, remoteEndpoint) errs.Go(tunnel.Start)
This is awesome.
tunnel/tunnel_test.go, line 17 at r1 (raw file):
func TestSSHTunnel_Start(t *testing.T) { handlerFunc := func(s sshserver.Session) { io.WriteString(s, "test")
Can this be an "echo" service? I was a little confused that "configure" resulted in "test".
tunnel/tunnel_test.go, line 111 at r1 (raw file):
_, err := sshIn.Write([]byte(cmd + "\r")) if err != nil { t.Errorf("Cannot write: %v", err)
Test execution doesn't stop on t.Errors - it would for t.Fatal -- can the test continue meaningfully after a failed Write?
This PR adds the
bmctool forward
to create an SSH tunnel to a BMC through a trusted host.This change is