I am looking for a way to authenticate to an OpenSSH SFTP server using an SSH certificate in .NET.
I can do this on the command line on linux or a newer version of Windows:
sftp -o CertificateFile=~/.ssh/sftpuser-cert.pub -i ~/.ssh/sftpuser sftpuser@xxx.xxx.xxx.xxx
but I can't seem to find a way to do the equivalent or I am misreading/misunderstanding docs from multiple vendors. Can anyone post an example of how to do this? Just to be specific I am NOT asking about authenticating with an SSH key in .NET, but with a certificate in "OpenSSH" format.
The "certificates" is a proprietary feature of OpenSSH. It's not a standard SSH thing. The standard SSH uses plain key files.
Support for OpenSSH certificates in other clients/libraries is rare.
My WinSCP .NET assembly does support certificates – If you can cope with its limitations (it's not native .NET assembly and runs on Windows only).
https://winscp.net/eng/docs/library