The channel has been closed" error

0 votes
asked Mar 18, 2010 by Carl Mitchell (150 points)
edited Mar 24, 2011

I am getting a "The channel has been closed" error when trying to test the upload ability of the SSH class. I've read about turning off compression, but understand it is off by default. The login to the connection works because downloads, lists, etc. all work.

Any thoughts would help me a lot. I have the most recent build og the DLLs.

Thanks.

THE CODE THAT FAILS ========================================

Dim hostname As String = "10.10.0.130"
Dim username As String = "retalixftp"
Dim password As String = "R3tal1x01"
Dim port As Integer = 22
 Dim keyPath As String = System.AppDomain.CurrentDomain.BaseDirectory() & "privkey_openssh_unencrypted.pem"

Dim privateKey As SshPrivateKey = New SshPrivateKey(keyPath, "")
sftp.Connect(hostname, port)
' authenticate  
sftp.Login("retalixftp", Nothing, privateKey)
' check fingerprint
Dim f As String = sftp.Fingerprint
'
If f <> "6c:48:31:1a:d1:6c:01:2e:c1:c9:78:c9:d6:36:9d:ae" Then
      Beep()
End If

Dim localPath As String = "C:\RetalixStore\Inbox\test.zip"
Dim remotePath As String = "../inbox/test.zip"

Dim bytes As Long = s.PutFile(localPath, remotePath) 
Debug.Print("Received:" & CStr(bytes))

' disconnect  
sftp.Disconnect()
sftp.Dispose()
commented Mar 19, 2010 by Lukas Pokorny (104,290 points)
Which version of Rebex SFTP do you use? Unless it's 2.0.3723.0, compression still needs to be turned off (see http://forum.rebex.net/questions/58/sftp-channel-has-been-closed). If this doesn't help, please send us a communication log produced using Sftp object's LogWriter property (see http://www.rebex.net/kb/logging.aspx).
commented Mar 24, 2010 by Lukas Pokorny (104,290 points)
Hello, is there any news on this?

1 Answer

0 votes
answered Apr 7, 2010 by Lukas Pokorny (104,290 points)
edited Apr 7, 2010

Compression is only off by default in Rebex SFTP 2.0.3723.0 and Rebex SSH Shell 1.0.3723.0. According to our database, you downloaded the new version of Rebex SFTP few days after asking the question, so hopefully you have already solved this issue. If you are still experiencing any problems, please let us know.

...