Public key authentication not working

Advertisement

equaeghe
Joined:
Posts:
2

Public key authentication not working

I have a Linux background and want to give someone using Windows SFTP access to my server. The server only accepts public key logins.

I have installed WinSCP (currently available version) on the Windows computer, generated a key pair using the included PuTTYgen, and put the public key in their ~/.ssh/authorized_keys file on the server. The private key is in the .ssh folder in their Windows user folder and properly linked to in the WinSCP session config.

Now, when I try to login using WinSCP, it does not work. Namely,
1. The passphrase for the private key is not prompted for, which already makes it clear no successful authentication attempt is possible.
2. An authentication attempt still seems to be going on and an error is shown: “No supported authentication methods available (server sent: publickey)”. It also tells me to look into a log (I have enabled logging in the settings), but it is unclear to me where I can find the log.
3. On the server, sshd logs "Connection closed by authenticating user <username> <ip-addr> port <port-nr>" in the preauth phase every time a login is attempted.

Apart from SSH > Authentication, nothing is changed in the session config away from the defaults. In SSH > Authentication I have obviously put the private key location and have tried all kinds of on/off permutations of the first three checkboxes of the Authentication options section (pertaining to Pageant, keyboard interactive, and password prompt).

Reply with quote

Advertisement

equaeghe
Joined:
Posts:
2

Re: Public key authentication not working

martin wrote:

Please attach the session log.
Where can I find it?

martin wrote:

Did you try using Tools > Install Public Key into Server?
https://winscp.net/eng/docs/ui_login_authentication#private_key
No, this is not possible. The server does not accept any authentication except for public key.

martin wrote:

Does the authentication work in any other client? PuTTY for example?
I will try that once I have access to the machine again.

martin wrote:

Yes, I followed/verified the steps described therein.

Reply with quote

Advertisement

You can post new topics in this forum