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

Wrong commands sequence. ShellStream.WriteLine didn't flush buffer before send its data. #180

Closed
theanurin opened this issue Feb 22, 2017 · 2 comments · Fixed by #1322
Closed
Assignees
Labels
Milestone

Comments

@theanurin
Copy link

theanurin commented Feb 22, 2017

using (var sshStream = sshClient.CreateShellStream("C#", 80, 25, 100, 100, 1000))
{
    new MemoryStream(sshClient.ConnectionInfo.Encoding.GetBytes("echo 'command 1'\r")).CopyTo(sshStream);
    sshStream.WriteLine("echo 'command 2'");
    sshStream.Flush();
}

Expected result:
command 1
command 2

Current result:
command 2
command 1

My use case:
I open embedded resource (somescript.sh) as stream and want to send all content of the somescript.sh to sshStream...

@drieseng drieseng added this to the 2017.0.0 milestone Aug 17, 2017
@drieseng drieseng self-assigned this Aug 17, 2017
@drieseng drieseng added the bug label Aug 17, 2017
keithallenjackson added a commit to keithallenjackson/SSH.NET that referenced this issue Aug 30, 2018
keithallenjackson added a commit to keithallenjackson/SSH.NET that referenced this issue Aug 30, 2018
@drieseng drieseng removed this from the 2017.0.0 milestone Mar 5, 2020
@IgorMilavec
Copy link
Collaborator

I have created a discussion #926 for all ShellStream related issues.

@WojciechNagorski
Copy link
Collaborator

This issue has been fixed in the 2024.0.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants