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()

asked 18 Mar '10, 19:39

Carl%20Mitchell's gravatar image

Carl Mitchell
261
accept rate: 0%

edited 19 Mar '10, 12:52

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.2k18

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).

(19 Mar '10, 13:01) Lukas Pokorny ♦♦

Hello, is there any news on this?

(24 Mar '10, 09:50) Lukas Pokorny ♦♦

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.

link

answered 07 Apr '10, 10:35

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.2k18
accept rate: 32%

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:

×39
×15
×13

Asked: 18 Mar '10, 19:39

Seen: 614 times

Last updated: 24 Mar '11, 01:22