I'm having problems executing commands with client.runcommand some commands works and some others fails (this particular command was grep), heres is the log:

2011-12-12 12:42:39.851 DEBUG Ssh(1) Info: Received 16384 bytes of data.
2011-12-12 12:42:39.851 DEBUG Ssh(1) Info: Received 16384 bytes of data.
2011-12-12 12:42:39.851 DEBUG Ssh(1) Info: Received 16384 bytes of data.
2011-12-12 12:42:39.867 DEBUG Ssh(1) Info: Received 16384 bytes of data.
2011-12-12 12:42:39.867 ERROR Ssh(1) SSH: Rebex.Net.SshException: The channel has been closed.
   at Rebex.Net.SshChannel.clmbOg(BBdsJfZ )
   at Rebex.Net.SshChannel.bOrbyiZ()
   at Rebex.Net.SshChannel.Receive(Byte[] buffer, Int32 offset, Int32 count)

asked 12 Dec '11, 17:08

lackote's gravatar image

lackote
151
accept rate: 0%

A workaround for a similar problem has been added to the next release but not released yet. I will mail you a link to the current build of Rebex SSH Pack - please give it a try and let me know if the problem persists.

(13 Dec '11, 16:08) Lukas Pokorny ♦♦

Hi Lukas, I tried with the link you send me but unfortunately it doesn't work.. same error.. How can I know what is causing that error? I try the exact same "grep" command with 2 different files, one works well while the other shows that SshException

link

answered 14 Dec '11, 01:15

lackote's gravatar image

lackote
151
accept rate: 0%

edited 14 Dec '11, 05:57

Could you please create two communication logs in Verbose mode and send it to us at support@rebex.net. One for grep with a failure and second one for the grep without a failure. We can tell you more after analyzing the log files.

Please create the log as follows:

Ssh client = new Ssh();
client.Connect(...);
client.Login(...);

client.LogWriter = 
client.Session.LogWriter = 
    new Rebex.FileLogWriter("c:/temp/ssh.log", Rebex.LogLevel.Verbose);
client.RunCommand("your grep command");
(14 Dec '11, 19:12) Lukas Matyska ♦♦

Email sent, thank you Lukas.

(16 Dec '11, 03:57) lackote

Problem Solved with new version (4368) thank you!

(16 Dec '11, 22:51) lackote

Thanks for letting us know about this issue! This was caused by a bug in SSH code and it will be fixed in the next release.

UPDATE

The fix is included in Release 2012 R1. SshChannel no longer attempts to adjust window size after the channel has been closed.

link

answered 19 Dec '11, 13:52

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.4k28
accept rate: 31%

edited 12 Mar, 16:41

Martin%20Vobr's gravatar image

Martin Vobr ♦♦
335310

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×44
×23
×5

Asked: 12 Dec '11, 17:08

Seen: 326 times

Last updated: 12 Mar, 16:41