0

I did the following on a Windows Server 2008 R2: Installed OpenSSH 0.0.24.0 by executing this command ->

powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1

and generated the keys with

ssh-keygen.exe -A

and corrected the permissions by executing these scripts:

FixHostFilePermissions.ps1
FixUserFilePermissions.ps1

Before that I created a .ssh directory in C:\Users\myUser\ and in it the authorized_keys file.

Then I generated a key pair (RSA 2048) on my local Windows 10 machine by using puttygen. I copied the public key content to the previously mentionend authorized_keys. The content looks like this:

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAhKWSd69VFVmzIqSvMMKN57F2lRuHrkuUB0Oij5V3IGVm4AP5kQkiQYW5vkDuEsc7/JPo1Yc/5900g49Y0QwRNu1Xn7NvpgFK1W/6z9QJ91/tGQbecsU38PkqBNEN4+uTLsoTRyPNyptjdb/0Bh4Dndu3WZ1111111111111111ZF3B/D7L+jDDXfcHW1G94Xh/c8dbChMp1rwmTBwkTnEKENA5O1chIMXosgQbR3QIEw6Y7P8/Lye1u5oxsyxQiCPTRRtLsNL1Ay6wRxXWCI+wmpSRUWPdNLY+DjdCvxvpUQFyuEVYqf7XFQuyeM3ZWg53JTPQVt4ONEAjj56wIUGQ== rsa-key-20181009

So it's one line and should be correct.

Now I'm trying to login using putty. Host -> 192.168.... port 22 and under Connection->SSH->Auth I gave it my private key location -> C:\Users\myUser\Desktop\rsa_private.ppk

When I'm now opening the connection and enter 'myUser' as user it looks like this:

Authenticating with public key "rsa-key-20181009"
Passphrase for key "rsa-key-20181009":
Server refused public-key signature despite accepting key!

sshd.log entries:

4828 10:17:26:721 Failed none for myUser from 192.168.109.82 port 55340 ssh2
4828 10:17:26:721 debug3: userauth_finish: failure partial=0 next methods="publickey,password,keyboard-interactive"
4828 10:17:26:721 debug3: send packet: type 51
4828 10:17:26:723 debug3: receive packet: type 50
4828 10:17:26:724 debug1: userauth-request for user myUser service ssh-connection method publickey
4828 10:17:26:724 debug1: attempt 1 failures 0
4828 10:17:26:724 debug2: input_userauth_request: try method publickey
4828 10:17:26:724 debug1: userauth_pubkey: test whether pkalg/pkblob are acceptable for RSA SHA256:/GEVnGRon2qx9bGvUAYosBBZiwgMUsUXDYssDwLUOSQ
4828 10:17:26:724 debug1: trying public key file C:\\Users\\myUser\\.ssh/authorized_keys
4828 10:17:26:724 debug1: matching key found: file C:\\Users\\myUser\\.ssh/authorized_keys, line 1 RSA SHA256:/GEVnGRon2qx9bGvUAYosBBZiwgMUsUXDYssDwLUOSQ
4828 10:17:26:724 debug3: send packet: type 60
4828 10:17:26:724 debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa
4828 10:17:26:724 Postponed publickey for myUser from 192.168.109.81 port 55340 ssh2

And at this point I don't know what to do... Does the log file tells me where the error is?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.