+1 vote
by (600 points)

I have generated a private key and public key pair.I am trying to authenticate via a sftp server tool

            // connect to a server and verify fingerprint
            var client = new Sftp();

            // load the private key
            SshPrivateKey privateKey = new SshPrivateKey(@"\\Test-222\Alex\MyData\my_key.ppk", "key_password");

            // log in
            client.Login(username, privateKey);

No suitable authentication method is supported. Supported methods: 'password'.

Applies to: Rebex SFTP

1 Answer

0 votes
by (58.9k points)

The private key authentication is not accepted by your SFTP server because your SFTP server is configured to only accept password authentication. You'll neeed to enable private/public key authentication at your server first. An exact way to do this depends on the server type. Please consult your SFTP server vendor.

by (600 points)
I am using sftp  server tool exe. How to test the same in this before making it on a certified sftp server?
by (58.9k points)
Do you mean Rebex Tiny Sftp server? https://www.rebex.net/tiny-sftp-server/
by (600 points)
I am using Core FTP mini SFTP server
by (600 points)
I tried with Rebex Tiny SFTP Server. I am able to connect on passing username and password. Also possible by passing username,password and privatekey.

But issue occurs on passing username and private key.
No suitable authentication method is supported. Supported methods: 'password,keyboard-interactive'.
by (58.9k points)
Hello, please download the newer beta version of Rebex Tiny Sftp server that now supports user public key authorization from http://www.rebex.net/getfile/3b5706c03fb440b7a3a4db722891e02e/RebexTinySftpServer-with-public-key-auth-Bin.zip and give it a try.
by (600 points)
it is working with private key authentication.I want the source code for the mentioned beta version of SFTP Tool.