Ask A Question

Notifications

You’re not receiving notifications from this thread.

Rails, Hatchbox, New SSH Key and Permission denied (publickey)

Tom Dringer asked in Servers

Hi, I am having to use a different computer whilst mine is in for repair. So i generated the SSH keys to be used for deployment with Hatchbox. Using deploy@x.x.x.x or root@x.x.x.x just gives me an error Permission denied (publickey). Does anyone know a fix for this? I am locked out of my server and i desperately need to check the logs for an error which is giving me a white screen of death. Thanks

Reply

I am having the same issue - and I just created the cluster!

Reply

Same issue!

I'm trying to add a second key! I can see the key is added to the .ssh/authorized_keys files along with the default Hatchbox key and my other key.

But I'm trying to login from a second device, and am getting the "Permission denied (publickey)." issue!

Reply

For anyone surfacing this question in a Google Search:

I solved it by checking my ~/.ssh/authorized_keys files!

Make sure your keys are added to that file!

You'll need to do it manually as you cant login with a password and execute ssh-copy-id!

Reply

I just had this issue. I just presumed I needed to add my laptops ssh key to keys field in the profile serttings area but I then realised I needed to add it into the specific server SSH key field. Just double check it is in both as the second I added it to the server section it all worked fine for me.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.