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

SSH NewSession Can Hang Indefinitely #15

Closed
amcrn opened this issue Jan 4, 2021 · 2 comments
Closed

SSH NewSession Can Hang Indefinitely #15

amcrn opened this issue Jan 4, 2021 · 2 comments

Comments

@amcrn
Copy link

amcrn commented Jan 4, 2021

See golang/go#26643

The relevant fix can be seen here: https://github.com/cybozu-go/cke/pull/81/files

I hit this using the latest goph client on a remote machine with a badly behaving SSH Server.

Workaround is to timeout the channel in which the goph calls are being executed.

    select {
    case result := <- someChannel:
        fmt.Println(result)
    case <- time.After(timeout * time.Second):
        fmt.Println("ssh new session was hung")
    }
@melbahja
Copy link
Owner

melbahja commented Jan 4, 2021

Hi,
I will see how we can fix it, thanks for useful info.

@melbahja
Copy link
Owner

you can use cmd with context fixed in #24, released in v1.3.0

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

No branches or pull requests

2 participants