Disconnected: No supported authentication methods available

Advertisement

c10c
Joined:
Posts:
11
Location:
New Delhi

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

Reply with quote E-mail

c10c
Joined:
Posts:
11
Location:
New Delhi

found solution...

_options.Protocol = Protocol.Sftp;
_options.HostName = "acetrax.upload.akamai.com";
_options.PortNumber = 22;
_options.UserName = "sshacs";
_options.SshHostKey = "ssh-rsa 1024 e0:4e:b5:73:79:26:5e:a2:7c:85:58:03:ac:4e:db:e3";
_options.SshPrivateKey = @"C:\Users\chiragc\Desktop\Net Storage\netstorage_pk.ppk";

Thanks for making me ponder on debug file :)

Reply with quote E-mail

Advertisement

You can post new topics in this forum