Source: Rebex.Net.Sftp, Method: Login, Error: No suitable authentication method is supported. Supported methods: 'publickey'

0 votes
asked Apr 26, 2012 by Sura (120 points)
edited Apr 26, 2012

I get this error when trying to access/logon to a clients' sftp site. What does it mean? Is there a problem with the setup of their site/the logon account? because I can access other sftp sites okay. Thanks

Applies to: Rebex SFTP

1 Answer

0 votes
answered Apr 26, 2012 by Tomas Knopp (58,890 points)
edited Apr 26, 2012

It looks like the server does not support username and password login only. In addition you have to use your private key for the authentication as shown below:

Sftp sftp = new Sftp();
sftp.Connect("servername", port);

// try using either
sftp.Login("user", new SshPrivateKey("pathToPrivateKey", "keypassword"));
// or method
sftp.Login("user","password", new SshPrivateKey("pathToPrivateKey", "keypassword"));

to be able login to this SFTP server.

...