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

An existing connection was forcibly closed by the remote host when run command to Win32-OpenSSH #51

Closed
Marimoiro opened this issue Jul 25, 2016 · 1 comment
Assignees

Comments

@Marimoiro
Copy link

I got the Exception
I can connect sshd server. bat I can't run any command.

An existing connection was forcibly closed by the remote host

        //Generate ConnectionInfo for Win32-OpenSSH sshd server (localhost)
        var info = GenerateConnectionInfo(name); 
        var client =  new SshClient(info);

        //In this timing IsConnected == true
        client.Connect();

        //Throw!! SshConnectionException 
        //An existing connection was forcibly closed by the remote host
         var cmd = client.RunCommand("dir");

        Console.WriteLine(cmd.Result);
@drieseng drieseng self-assigned this Aug 1, 2016
@drieseng
Copy link
Member

drieseng commented Aug 1, 2016

This is a known issue in Win32-OpenSSH.
More information is available here.

@drieseng drieseng closed this as completed Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants