Hi,
Just to make sure I'm understanding this correctly: the main difference (when doing server validation) between FTPS and SFTP is that the client needs the server's certificate with FTPS but only the public key with SFTP. This public key is derived from a certificate on the server, and needs to be in SSH (or SECSH) format.
I'm connecting to a test server with ServerValidation set to Automatic and by adding a public key file to known hosts as follows: ((SecureFTPConnection)ftpClient).KnownHosts.AddKnownHost(publishConfig.Host, publicKeyFile);
The only way I've managed to successfully connect is with a lot of exporting/converting to get the public key from the certificate (that the server is using), and into the correct format. I'm a bit confused, though, because in your documentation, certificates are really only mentioned under FTPS, but SFTP is only concerned with the server's public key.
I guess my question is, am I on the right track here?
And what exactly is the server's public key in an SFTP context? Should it not be easy to get the public key?
Thanks in advance,
Graeme