InitializeSftp – Received FAILURE response to subsystem request.

If the SSH server is setup/configured to not allow SFTP, or your SSH user account is not allowed to use SFTP, the InitializeSftp method will return a failed status. Here is an example: ChilkatLog: InitializeSftp: DllDate: Oct 30 2009 UnlockPrefix: ABC123 Username: chilkat Component: .NET 2.0 SshVersion: SSH-2.0-OpenSSH_4.5 SftpVersion: 0 …

SFTP Path Syntax

The SFTP protocol does not specify how absolute paths should be formatted.  For example, suppose your SFTP server runs on a Windows system and you wish to open (on the remote server) “C:\Temp\someFile.txt”.   Passing the exact string “C:\Temp\someFile.txt” to OpenFile will likely result in failure.  Different SSH/SFTP servers may expect …

F-SECURE SSH/SFTP Servers Require Client Identifier to be PuTTY?

We’ve discovered that F-SECURE SSH/SFTP servers will disconnect during authentication if the SSH client identifier is “SSH-2.0-ChilkatSSH_2.0.0”. This may be overridden by setting the ClientIdentifier property to mimic PuTTY by using a string such as: “SSH-2.0-PuTTY_Local:_May_15_2009_16:25:24”

SFTP Append to Existing File

To append to an existing file using the Chilkat SFTP component / library, open the file for “writeOnly” and “openExisting”, then call any of the Write* methods (such as WriteFileText or WriteFileBytes), and then close the handle by calling CloseHandle. As always, if a method returns a failed status, check …

SFTP Progress Monitoring and Abort (C#)

Here is an example for monitoring the progress of an SFTP file transfer: void sftp_OnPercentDone(object sender, Chilkat.PercentDoneEventArgs args) { progressBar1.Value = args.PercentDone; // To abort at any point, you may set args.Abort = true // args.Abort = true; } void sftp_OnAbortCheck(object sender, Chilkat.AbortCheckEventArgs args) { // See http://cknotes.com/?p=149 for more …

SFTP Server Error Messages – sometimes obscure and misleading

Two recent customer support issues prompted this post.  In both cases, the error reported by the SFTP server was both lacking in information as well as somewhat misleading.  One brand of server was: SSH-2.0-http://www.sshtools.com J2SSH [SERVER] The other was: SSH-2.0-WS_FTP-SSH_7.1 With the 1st SSH server, the following error occurred when …