Skip to content
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

Add a --ssh-agent-forwarding flag #88

Merged
merged 2 commits into from
Jun 24, 2016
Merged

Conversation

tbalthazar
Copy link
Contributor

It doesn't work on Windows, since the custom ssh client for Windows
doesn't have agent support yet, as stated in issue #65.

This feature has been requested in issue #77.

That's my first contribution to doctl, comments are welcome!

It doesn't work on Windows, since the custom ssh client for Windows
doesn't have agent support yet, as stated in issue digitalocean#65
@bryanl
Copy link
Contributor

bryanl commented Jun 22, 2016

Hello,

Thanks for the suggestion. SSH agent forwarding is a needed feature. I have a few questions about the implementation, and I'll add those inline.

@@ -196,15 +196,15 @@ func withTestClient(t *testing.T, tFn testFn) {
}

type TestConfig struct {
SSHFn func(user, host, keyPath string, port int) runner.Runner
SSHFn func(user, host, keyPath string, port int, agentForwarding bool) runner.Runner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking this won't be the last option for SSH, so shouldn't we pass this option in a more forward-thinking way?

type SSHOptions map[string]interface{}

func(user, host, keyPath string, port int, options SSHOptions) runner.Runner {}

This would allow you do something like:

opts[doctl.ArgsSSHAgentForwarding] = true

Not sure what this means long term, but it would solve the immediate issue of longer function signatures.

@tbalthazar
Copy link
Contributor Author

Hi Bryan,

Thanks for the suggestion, it's definitely an improvement!

Cheers,
Thomas.

@bryanl bryanl merged commit 713c861 into digitalocean:master Jun 24, 2016
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