Disconnected: No supported authentication methods available
Hi,
I am writing the following code to connect to my sFTP server
public sFTP()
{
_session = new Session();
_session.DebugLogPath = @"E:\Logs\WINSCP_Debuglog.txt";
_session.SessionLogPath = @"E:\Logs\WINSCP_Sessionlog.txt";
_session.DisableVersionCheck = true;
_session.DefaultConfiguration = false;
_session.Open(Initialize());
}
private SessionOptions Initialize() /* values hidden for confidentiality */
{
_options = new SessionOptions();
_options.Protocol = Protocol.Sftp;
_options.HostName = "xx.xx.xx.com";
_options.PortNumber = 22;
_options.UserName = "xxxxx";
_options.SshHostKey = "ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx";
return _options;
}
But, everytime it gives me the error in the subject, do i need to supply the private key (PPK) also?
Please help
I am writing the following code to connect to my sFTP server
public sFTP()
{
_session = new Session();
_session.DebugLogPath = @"E:\Logs\WINSCP_Debuglog.txt";
_session.SessionLogPath = @"E:\Logs\WINSCP_Sessionlog.txt";
_session.DisableVersionCheck = true;
_session.DefaultConfiguration = false;
_session.Open(Initialize());
}
private SessionOptions Initialize() /* values hidden for confidentiality */
{
_options = new SessionOptions();
_options.Protocol = Protocol.Sftp;
_options.HostName = "xx.xx.xx.com";
_options.PortNumber = 22;
_options.UserName = "xxxxx";
_options.SshHostKey = "ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx";
return _options;
}
But, everytime it gives me the error in the subject, do i need to supply the private key (PPK) also?
Please help