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

martin

Re: I can´t connect with private key without password

Nacho wrote:

Now I need a dll that works find with 32 bit

WinSCP .NET assembly works both in 32 and 64-bit.
Nacho

Re: I can´t connect with private key without password

Thank you! I scan fingerprint and add to SessionOptions.SshHostKeyFingerprint and it works perfectly. Now I need a dll that works fine with 32 bit.
Nacho

I can´t connect with private key without password

Hi,

I trying to connect SFTP with .ppk file without password with .NET assembly with session options C#, this is my code
SessionOptions sessionOptions = new SessionOptions();
sessionOptions.Protocol = Protocol.Sftp;
sessionOptions.HostName = "xxx.xxx.xxx.xxx";
sessionOptions.PortNumber = 22;
sessionOptions.UserName = "user";
sessionOptions.SshPrivateKeyPath = path
 
using (Session session = new Session())
{
   try
   {
       session.Open(sessionOptions);
   }
   catch (Exception ex)
   {
       MessageBox.Show(ex.Message);
   }
}

The message I receive when trying is:
SessionOptions.Protocol is Protocol.Sftp or Protocol.Scp, but SessionOptions.SshHostKeyFingerprint is not set

I try to connect with the graphical interface with the same configuration and it works at the first.

Some suggestion?
Thanks!!!!