I'm using PuTTY for Windows to connect to dreamcompute-VPS(dreamhost). At dreamcompute panel, I created a private key and downloaded it, a .pem file. Using PuTTYgen, I converted this file to .ppk as SSH2-RSA. So, I downloaded Pageant.exe and added this .ppk file. At PuTTY.exe, I put as Host Name the floating IP gotten from dreamcompute panel, set the username at Connection->Data as dhc-user and, finally, loaded the .ppk file at Connection->SSH->Auth. The problem is when I open the connection, the authentication process keeps asking me for password. What am I missing? Shouldn't It be only username and keys?


=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2015.07.21 15:08:26 =~=~=~=~=~=~=~=~=~=~=~=
Event Log: Writing new session log (SSH raw data mode) to file: C:\Users\User\Desktop\putty.log
Event Log: Looking up host ""
Event Log: Connecting to port 22
Event Log: Server version: SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
Event Log: We believe remote version has SSH-2 channel request bug
Event Log: Using SSH protocol version 2
Event Log: We claim version: SSH-2.0-PuTTY_Release_0.64
Event Log: Doing Diffie-Hellman group exchange
Event Log: Initialised AES-256 SDCTR client->server encryption
Event Log: Initialised HMAC-SHA-256 client->server MAC algorithm
Event Log: Initialised AES-256 SDCTR server->client encryption
Event Log: Initialised HMAC-SHA-256 server->client MAC algorithm
Event Log: Reading private key file "C:\Users\User\Desktop\private.ppk"
Event Log: Pageant is running. Requesting keys.
Event Log: Pageant has 1 SSH-2 keys
Event Log: Pageant key #0 matches configured key file
Event Log: Trying Pageant key #0                           
Event Log: Server refused our key
  • 1
    please, provide log generated by putty to investigate if this key is even used/tried. – Jakuje Jul 21 '15 at 18:05
  • Try the other way around, create the SSH key on Windows using puttygen and upload that key on DreamCompute panel. Full instructions on help.dreamhost.com/hc/en-us/articles/… – Stefano Maffulli Aug 15 '16 at 22:08

The main issue is here:

Event Log: Server refused our key

This can be caused by incorrect permissions on .ssh/authorized_keys, or an invalid key.

The permission can be solved using this:

chmod -R go-rwx ~/.ssh

The other possibility is the wrong key. You must append the public key on ~/.ssh/authorized_keys, not the private key. Check if the correct key is there.

  • Here in the panel, there's this instance thing (I don't know whats an instance :D). There, is associated a key pair that I'm not using to login, is that could be the problem? – João Paulo Jul 21 '15 at 19:00
  • 1
    Yes, it can be the problem. You must use the keys the instance gives you. Or you must put the key you are trying to use on ~/.ssh/authorized_keys. – ThoriumBR Jul 21 '15 at 19:28
  • Thanks for your help! I'll try to solve it. I'm gonna see if I solve this instance thing. I don't know how to manage the .shh folder cause I can't even connect to server. – João Paulo Jul 21 '15 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.