Topic "Disconnected: No supported authentication methods available"

Author Message
c10c
[View user's profile]

Joined: 2012-04-03
Posts: 11
Location: New Delhi
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
c10c
[View user's profile]

Joined: 2012-04-03
Posts: 11
Location: New Delhi
_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 Smile
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License