Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: How to use the WinSCP Assembly with a Client Certificate?

WinSCP does not support client certificates.
https://winscp.net/tracker/921

On the other hand, client certificates are used with TLS/SSL (FTPS or WebDAVS).

They are NOT used with SFTP, that you claim to use.

SFTP uses simple private/public key pair.

So if you actually want to use private key for authentication, use SessionOptions.SshPrivateKeyPath:
https://winscp.net/eng/docs/library_sessionoptions
tresstylez

How to use the WinSCP Assembly with a Client Certificate?

I have a requirement that we connect to a remote SFTP server to upload some files. The remote server does not accept username/password authentication -- and instead only accepts public key authentication, where each client needs to present a client certificate to be authenticated/authorized.

How can I use (the latest) WinSCP .Net Assembly (via Powershell) to automate this process? I currently use the assembly in the username/password format and things work fine, but this is a totally different requirement so I'm wondering if I can extend the script already created of if I need to look elsewhere.

Thanks!

jg