secure copy file from one remote server to another using scp ubuntu command
zbarakzai opened this issue · 1 comments
I have two ubuntu server and want to write php artisan command to securely copy the file from one remote ubuntu server "A" to another "B". I configured the ssh keys in both server when I am manually ssh ing to server A from my terminal and running this command scp path/to/file/in-server-A user@IP:~/data/
it's working perfectly, but running the same command from php artisan copy:file
it give me this error Error Output: ================ user@IP: Permission denied (publickey). lost connection
didn't figure out what is the problem and how to solve it.
Ssh::create('user', 'host')->execute('scp path/to/file/in-server-A user@IP:~/data/');
On this issue tracker we can't help you with permission problems of your particular setup.
Should you find the package causes the error, feel free to submit a PR that fixes your issue.