Using Drush alias, getting Permission denied (publickey) error

Using Drush alias, getting Permission denied (publickey) error

6 posts / 0 new
Last post
vaibhav.jain@acquia.com's picture
vaibhav.jain
Points: 0
Using Drush alias, getting Permission denied (publickey) error

Hi Team,

I have recently added the Drush alias on my machine to run drush commands on Acquia cloud. I used this doc to add drush alias - https://docs.acquia.com/cloud/drush-aliases. I also added SSH key, using this doc - https://docs.acquia.com/cloud/ssh/enable/add-key
Now, Whenever I run the command "drush @SITENAME.ENV status", it gives me this error "Permission denied (publickey)."
Not sure what this is, and why this happens, but I am kind of stuck and can't do any other operations.

Also, can anyone point me to doc which I can use to ssh onto the server using drush alias.

Status: 
Unresolved
dmyburgh's picture
david.myburgh
Points: 99

It sounds like your SSH key is not installed on your Acquia Cloud account. This documentation should help you handle that: https://docs.acquia.com/cloud/ssh/enable/add-key. You should also ensure that your Windows machine has the keys in the right place.

vaibhav.jain@acquia.com's picture
vaibhav.jain
Points: 0

Thanks for the reply David.
I have added the key earlier, and checked the doc too. The doc has same steps as I have performed, so things look to be good with Keys.
Also, I am on a Mac.

dmyburgh's picture
david.myburgh
Points: 99

Apologies, I obviously didn't read your initial post very well. My only excuse is that I'm on vacation, so my work brain is not fully engaged :)

I would ensure that your key is showing up in the "Users and keys" section on https://insight.acquia.com/cloud/users?s=xxxxxxx. From there you can also see an full ssh command to use to get to your server from your Terminal. Copy and paste that to see if it works. If that fails with the same error, then there is something wrong with your key for some reason. I would then try removing it from your account, and re-adding it. I can't think of anything else right now, I'm afraid.

vaibhav.jain@acquia.com's picture
vaibhav.jain
Points: 0

No issues.
I have seen that the key is visible in "users and keys" section of the cloud, and I was able to get the ssh command as well. When I ran that, I see the same error "Permission denied (publickey)." I removed and added the ssh key, but no luck.
I removed my current ssh key, generated a new ssh key, added to account, and still no luck. Not sure what is wrong with this.

Please enjoy your Vacation. After you are back, please see, if there can be something I can do more to rectify this.

lisa.huang@bcbsri.org's picture
lisa.huang
Points: 0

Hi,
Did you find the solution to your problem?
I have the same issue now in my home computer when i try to clone my repository.
Got the 'permission denied' error.

Thanks.