Post a reply

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

bwood

Thanks, I mixed up my public and private.
bwood

Can't Properly set PublicKeyFile using .Net

I'm connecting fine to my SFTP site using WinSCP UI using only user name & PublicKeyFile.

Using the .NET library, I'm setting
HostName
,
UserName
,
SshHostKeyFingerprint
, and
session.AddRawConfiguration("PublicKeyFile", @"C:\temp\id_rsa.ppk");


The session log, however, shows:
Command-line: ... PublicKeyFile="C:\temp\id_rsa.ppk" ....

...
Server offered these authentication methods: publickey,password,keyboard-interactive
Attempting keyboard-interactive authentication


So the PublicKeyFile is passed, but in the end, it doesn't seem to be used.