fisma-ready / ubuntu-lts

Ubuntu 14.04 LTS is FISMA Ready.
Other
54 stars 26 forks source link

Unable to SSH - "Server Refused Our Key" #32

Open anweiss opened 9 years ago

anweiss commented 9 years ago

I'm working on adding Microsoft Azure support for this project and am running in to an SSH issue that I can't seem to figure out. Upon attempting to SSH into a VM created from this image, the server fails to accept my key. I generated the cert/key with openssl as follows:

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout myKey.key -out myCert.pem
chmod 600 myKey.key

The public cert subsequently gets uploaded via the Azure portal and placed in ~/.ssh/authorized_keys.

This issue doesn't seem to be related to packer-azure since I'm able to SSH into an image that's created without any Packer provisioners. This only seems to occur after the Chef recipe is applied via the chef-solo provisioner.

ghost commented 8 years ago

I'm having the exact same problem, used Cygwin to create the key, fed it into Puttygen, used the saved key with Putty, and I'm getting the same error message