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

x/crypto/ssh: provide Client.DialContext method #20288

Open
ydnar opened this Issue May 8, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@ydnar
Copy link

ydnar commented May 8, 2017

Similar to #17759, it would be useful for ssh.Client to provide a DialContext method next to its Dial method. We use SSH tunnels for connecting to domain registries that use IP whitelisting.

We’ve been progressively consolidating our timeout and deadline code to use context.Context throughout, implementing workarounds for dialers in APIs that lack Context support.

@gopherbot gopherbot added this to the Unreleased milestone May 8, 2017

@hanwen

This comment has been minimized.

Copy link
Contributor

hanwen commented Jun 7, 2017

what exactly do you want controlled with deadline? The underlying TCP deadline? Or were you thinking of a SSH-level support for deadlines?

@glycerine

This comment has been minimized.

Copy link

glycerine commented Aug 11, 2017

My use case is not leaking goroutines. When my goroutine does a blocking read on an ssh.Channel it is always blocked, I can't signal that goroutine to shutdown. The usual way with a net.Conn is to set read and write deadlines, then poll for errors. So I was thinking of SSH channel level support for (both read and write) deadlines.

@glycerine

This comment has been minimized.

Copy link

glycerine commented Aug 26, 2017

My experimental fork https://github.com/glycerine/xcryptossh provides Dial with context and idle timers for Read/Write unblocking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.