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
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).
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).