Laravel “envoy run” command not working with ssh k

2019-06-11 07:51发布

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?

2条回答
叼着烟拽天下
2楼-- · 2019-06-11 08:17

It is possible as answer above for AWS user when you attempting to ssh in production mode, after define "config" file as "~/.ssh/config":

Host ec2-52-29-45-15.eu-central-2.compute.amazonaws.com
    IdentityFile /home/tux/Desktop/ssh/masterpro.pem
    User ubuntu
查看更多
时光不老,我们不散
3楼-- · 2019-06-11 08:41

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:

Host 54.187.123.4
    IdentityFile ~/.ssh/sw-new.pem
    User ubuntu

That should work.

查看更多
登录 后发表回答