Laravel “envoy run” command not working with ssh key

眉间皱痕 提交于 2019-12-08 13:52:37

问题


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?


回答1:


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.




回答2:


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


来源:https://stackoverflow.com/questions/24562774/laravel-envoy-run-command-not-working-with-ssh-key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!