I have a windows application using a SecureFTPConnection object to connect to a Tumbleweed server. I'm getting I've created a monitor form to show the status of the file transfer by adding FTPCommandView and FTPStatusBar objects and setting their .connection properties to the SecureFTPConnection object after it is instantiated and it's properties are set. Everything works fine - the files are uploaded and downloaded, but I see error messages in the Commandview control during the upload.
Command: CONNECT 24.249.236.140
Command: CONNECT 24.249.236.140
Reply: OK
Command: OPEN SFTP
Reply: OK
Command: INIT
Reply: OK
Reply: Error - /test3.txt is not a valid file path
Command: STOR /test3.txt
Reply: Error - /test3.txt is not a valid file path
Reply: OK
Command: CHMOD 755 /test3.txt
Reply: OK
Reply: Error - /TR-2006-45.doc is not a valid file path
Command: STOR /TR-2006-45.doc
Reply: Error - /TR-2006-45.doc is not a valid file path
Reply: OK
Command: CHMOD 755 /TR-2006-45.doc
Reply: OK
Command: ATTR /Outbound
Reply: OK
Command: LIST /Outbound
Reply: OK
Command: CD Outbound
Reply: OK
Command: ATTR /Outbound/cpuz_146.zip
Reply: OK
Command: RETR /Outbound/cpuz_146.zip
Reply: OK
Command: ATTR /Outbound/test3.txt
Reply: OK
Command: RETR /Outbound/test3.txt
Reply: OK
Command: QUIT
Reply: CLOSED OK
This is the code that handles the upload:
' For uploads, leave connection in root (tied to user login account)
For Each fname As String In filelist
If fname.EndsWith(".txt") Then
sftp.TransferType = FTPTransferType.ASCII
Else
sftp.TransferType = FTPTransferType.BINARY
End If
sftp.UploadFile(fname, System.IO.Path.GetFileName(fname))
My.Computer.FileSystem.DeleteFile(fname, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
Next
'Change to /outbound directory on secure server to download files
Dim FilesToGet() As String = sftp.GetFiles("Outbound")
sftp.ChangeWorkingDirectory("Outbound")
For Each fname As String In FilesToGet
If Not fname.Equals(".") AndAlso Not fname.Equals("..") Then
If fname.EndsWith(".txt") Then
sftp.TransferType = FTPTransferType.ASCII
Else
sftp.TransferType = FTPTransferType.BINARY
End If
sftp.DownloadFile(sftp.LocalDirectory, fname)
End If
Next
sftp.Close()
Pretty straight forward stuff, but I don't understand why I get the errors on the upload.
Here's the full debug log if it helps:
[quote]
INFO [LicenseProperties] 11 Nov 2008 16:19:07.192 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 11 Nov 2008 16:19:07.204 : Production license
DEBUG [FTPConnection] 11 Nov 2008 16:19:07.207 : Set LocalDirectory='C:\Users\Rocky\Desktop\EDS-Transfer\EDS-Transfer\bin\Release'
INFO [LicenseProperties] 11 Nov 2008 16:19:07.236 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 11 Nov 2008 16:19:07.237 : Production license
DEBUG [SSHFTPClient] 11 Nov 2008 16:19:07.242 : Setting up fallback kbi prompt based on supplied password
DEBUG [HostNameResolver] 11 Nov 2008 16:19:07.299 : sftp01.af-group.com resolved to 24.249.236.140
DEBUG [SSHFTPClient] 11 Nov 2008 16:19:07.309 : Connecting directly to SFTP server 24.249.236.140:22
DEBUG [SSHFTPClient] 11 Nov 2008 16:19:07.599 : Connected successfully to SFTP server 24.249.236.140:22
DEBUG [SSHConnection] 11 Nov 2008 16:19:07.602 : Beginning protocol negotiation
DEBUG [PlainSocket] 11 Nov 2008 16:19:07.836 : RepeatCallback received 14 bytes
DEBUG [ProtocolNegotiationHandler] 11 Nov 2008 16:19:07.843 : offset=0,length=14
DEBUG [ProtocolNegotiationHandler] 11 Nov 2008 16:19:07.843 : pos=13
INFO [ProtocolNegotiationHandler] 11 Nov 2008 16:19:07.843 : Server version = SSH-2.0-SSHD
DEBUG [SSHConnection] 11 Nov 2008 16:19:07.846 : Server version=SSH-2.0-SSHD
DEBUG [SSH2Connection] 11 Nov 2008 16:19:07.855 : Timeout=120000
DEBUG [SSHConnection] 11 Nov 2008 16:19:07.860 : Sending client version=SSH-2.0-edtFTPnet/PRO-5.1.0.20
DEBUG [SSH2Connection] 11 Nov 2008 16:19:07.865 : Starting key exchange
DEBUG [KeyExchanger] 11 Nov 2008 16:19:07.869 : Sending SSH_MSG_KEXINIT
DEBUG [KeyExchanger] 11 Nov 2008 16:19:07.880 : Client hostkey algorithms=ssh-dss,ssh-rsa
DEBUG [KeyExchanger] 11 Nov 2008 16:19:07.883 : Client ciphers=aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,3des-cbc
DEBUG [KeyExchanger] 11 Nov 2008 16:19:07.883 : Client ciphers=aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,3des-cbc
DEBUG [KeyExchanger] 11 Nov 2008 16:19:07.891 : Client MACs=hmac-sha1,hmac-md5
DEBUG [KeyExchanger] 11 Nov 2008 16:19:07.891 : Client MACs=hmac-sha1,hmac-md5
DEBUG [KeyExchanger] 11 Nov 2008 16:19:07.895 : Client compression algorithms=none,zlib
DEBUG [KeyExchanger] 11 Nov 2008 16:19:07.895 : Client compression algorithms=none,zlib
DEBUG [KeyExchanger] 11 Nov 2008 16:19:07.907 : Sent SSH_MSG_KEXINIT
DEBUG [KeyExchanger] 11 Nov 2008 16:19:07.907 : Reading SSH_MSG_KEXINIT reply
DEBUG [SSH2Connection] 11 Nov 2008 16:19:07.912 : Waiting for packet
DEBUG [PlainSocket] 11 Nov 2008 16:19:08.121 : RepeatCallback received 296 bytes
DEBUG [SSH2PacketBuilder] 11 Nov 2008 16:19:08.128 : ConstructPacket: _cipher=null,len=292
DEBUG [SSH2PacketBuilder] 11 Nov 2008 16:19:08.130 : Writeoffset=296,Readoffset=296
DEBUG [SSH2Connection] 11 Nov 2008 16:19:08.130 : Packet arrived
DEBUG [KeyExchanger] 11 Nov 2008 16:19:08.141 : Processing SSH_MSG_KEXINIT reply
DEBUG [KeyExchanger] 11 Nov 2008 16:19:08.144 : Kex alg=diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
DEBUG [KeyExchanger] 11 Nov 2008 16:19:08.145 : Hostkey alg=ssh-rsa
DEBUG [KeyExchanger] 11 Nov 2008 16:19:08.148 : Cipher CS=blowfish-cbc,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
DEBUG [KeyExchanger] 11 Nov 2008 16:19:08.149 : Cipher C->S= AES128
DEBUG [KeyExchanger] 11 Nov 2008 16:19:08.149 : Cipher SC=blowfish-cbc,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
DEBUG [KeyExchanger] 11 Nov 2008 16:19:08.149 : Cipher S->C= AES128
DEBUG [KeyExchanger] 11 Nov 2008 16:19:08.149 : MAC CS=hmac-sha1,hmac-md5
DEBUG [KeyExchanger