I've been gone for a week, and just got back and tested it.
ScSFTPClient.Version := vSFTP6;
Thanks, Viktor; that does get rid of it, making it work w/ that server.
I've always had it set at 3, based on this statement in the documentation:
If the client wants to interoperate with servers that support discontinued versions of the SFTP protocol, it should set this property to vSFTP3, and then use the OnVersionSelect event handler.
I think I need to understand how to properly use the Version property and the OnVersionSelect event.
Does "Version" represent the lowest server version I want to allow the highest, or something else?
Right now, I have only a single line in OnVersionSelect that logs a warning: "Old SFTP Server version; may not be supported yet." (I have one site that produces this warning; I don't know what they're running for a server.)
I also have code at the top of a routine where I'm calling OpenDirectory/ReadDirectory:
Code: Select all
If ord(frmRun.SFTPCli.ServerVersion) <> 3 then
ErrSub(1,'SFTP Server version '+inttostr(ord(frmRun.SFTPCli.ServerVersion))+' may not be supported yet.');
I've never seen that msg in production; however, when I changed my version from 3 to 6 and tested against this problem server, it logged that msg, indicating a server version of 4. (When I run against one of my "normal" servers, I get no messages at all. Does this tell me that my "normal" server supports a range of versions of at least 3-6 (and is using 3 if my client is set to 3, or 6 if I set it to 6) but the problem server ONLY supports version 4?
If I basically want to support every SFTP version that SecureBridge supports (recognizing that some features aren't available in SFTPv2), what should I do?