How to enable private key authentication mode in Rebex Tiny SFTP Server?

+2 votes
asked Aug 11, 2016 by alexander.junior (400 points)
retagged Aug 11, 2016 by Tomas Knopp

I am using Rebex Tiny SFTP Server. I am able to connect on passing username and password. Also working fine by passing username,password and privatekey.

client.Login(username,password);
client.Login(username,password,privateKey);

But issue occurs on passing username and private key.
client.Login(username,privateKey);
No suitable authentication method is supported. Supported methods: 'password,keyboard-interactive'.

Applies to: Tiny SFTP Server

1 Answer

0 votes
answered Aug 11, 2016 by Tomas Knopp (58,890 points)
edited Sep 19, 2016 by Tomas Knopp

Update: Private/public key authentication was released in version 1.0.2. You can download it from https://www.rebex.net/tiny-sftp-server/ and give it a try.

A beta version of Rebex Tiny SFTP server with support for private/public key authentication is already available. Please download it and give it a try.
It will be included in one of the next Tiny Sftp Server releases.

You will need to put your user's public keys into the directory specified by the 'userPublicKeyDir' value in the config file.

 <add key="userPublicKeyDir" value="userKeys"/> 

commented Mar 19 by hiasltiasl (110 points)
I put my public key in that directory, and Tiny Rebex SFTP server prints a message that the key was loaded successfully. But when I try to connect, authentication fails.

My guess is that I need to associate the public key to a username, so when a client tries to connect, the server knows which key to use.
Could that be the problem? If so, how do I do that?

Otherwise, do you have an idea what I could bemissing?
commented Mar 21 by Lukas Paluzga (850 points)
The server only supports one user so any public keys found are associated with the user. Just checking, does your SFTP client actually load your private key?
...