I am running following command in a laravel project folder and getting following error.
rakib$ envoy run list --env=production
[ubuntu@54.187.123.4]: Permission denied (publickey).
But I can successfully ssh using following command:
ssh -i ~/.ssh/sw-new.pem ubuntu@54.187.123.4
My ~/.ssh/config file content looks like:
Host 54.187.123.4
IdentityFile ~/.ssh/sw-new.pem
Can anyone suggest me what is the possible reason of getting "Permission denied" error?
It is possible as answer above for AWS user when you attempting to ssh in production mode, after define "config" file as "~/.ssh/config":
It's possible that envoy is using the wrong user when attempting to ssh into the production server. Specify a user in your ~/.ssh/config file:
That should work.