Connecting in Client Works, .Net Doesn't
Hello,
I am able to make an SFTP connection using public/private keys to our server using the WinSCP client. However, trying to connect via the .Net assembly doesn't work and errors with:
Connection has been unexpectedly closed. Server sent command exit status 0
Here are my SessionOptions:
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
PortNumber = 22,
HostName = "servername",
UserName = "sftpuser",
SshHostKeyFingerprint = "ssh-rsa 1024 fc:e3:82:20:f1:6a:f2:a7:ef:ee:62:9a:48:e8:34:a7",
SshPrivateKeyPath = @"C:\temp\rsa-key-20130424_dvmsp006.ppk"
};
I couldn't find any documentation on whether I'm setting up my options correctly when doing this. Any help would be GREATLY appreciated!
I am able to make an SFTP connection using public/private keys to our server using the WinSCP client. However, trying to connect via the .Net assembly doesn't work and errors with:
Connection has been unexpectedly closed. Server sent command exit status 0
Here are my SessionOptions:
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
PortNumber = 22,
HostName = "servername",
UserName = "sftpuser",
SshHostKeyFingerprint = "ssh-rsa 1024 fc:e3:82:20:f1:6a:f2:a7:ef:ee:62:9a:48:e8:34:a7",
SshPrivateKeyPath = @"C:\temp\rsa-key-20130424_dvmsp006.ppk"
};
I couldn't find any documentation on whether I'm setting up my options correctly when doing this. Any help would be GREATLY appreciated!