

Had to create the file: C:\ProgramData\ssh\administrators_authorized_keysĪnd copy the public key text into it, e.g: ssh-rsa AAAA.MmpfXUCj rsa-key-20190505Īnd then save the file. The -ddd is verbose level 3.Īfter making a connection, scanning the logs revealed: debug1: trying public key file _PROGRAMDATA_/ssh/administrators_authorized_keysĭebug3: Failed to open file:C:/ProgramData/ssh/administrators_authorized_keys error:2ĭebug1: Could not open authorized keys '_PROGRAMDATA_/ssh/administrators_authorized_keys': This creates a one-time use connection listener. Note: specify the full path to the exe otherwise sshd complains. Then run:Ĭ:\OpenSSH-Win32>c:\OpenSSH-Win32\sshd.exe -ddd Stop the two OpenSSH services, then open a command prompt with admin permissions. Getting it to work with a public key came down to the permissions on the file: C:\ProgramData\ssh\administrators_authorized_keys However, authenticating with the username in combination with a private key, the response was server refused our key. It was easy to make a connection using the Windows login username and password. Running Windows 8.1 I ran into the server refused our key problem. I've done all this still getting 'refused our key' error and I'm out of ideas. I've looked everywhere and all articles and tips mention setting chmod 600 and 700 for the file/directory and formatting the key correctly. Nothing is logged to /var/log/auth.log when attempting to log in with the key. When I try connecting I'm getting 'server refused our key' and server asks for password. Both directory and file owned by the actual user that I try to log in. ssh dir permission level is 700, authorized_keys file permission is 600. So it's correct (one line, no comments, starts with ssh-rsa, etc.) The public key is this: ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAopfM6RHOgnuc4Aftn3t4k5UIAT3StCAbn/vg/IMbphbXadshC+79sIlRq3P4zGzMjFTP4hKnzu6ehLV5lmj/qorq3SKT+bPO5Qrac3VbIlrGvuBFDDjP82I2Hwg3HzlsFTstqk++KToapaTYZ7jENEYyPl2wnzITJnt//+4U1o6juoXTKgdNE02hHnRZyHOV/bnkZyJJCEwJv5U0eXSThQnhmXtUxGT8U0HQNFiXfqIIVllhWiCnyrhhIaKz/CIJNAd2VmzyJzQtJtTQX8aWSNVrZju6Sv2/RncTNvsACdNgjjh/FH8PQXaep00jlJ3MOdsC8vz6VSPFbh6iKy1oLQ= rsa-key-20131231

On server (Ubuntu 12.04.3 LTS), I have put my public key in ~/.ssh/authorized_keys. I created key pair using puttygen.exe (client is windows 8).
