I’ve never been able to get the instructions at: https://easyengine.io/tutorials/linux/setup-sftp/ to work, fully.
I follow the instructions to the point of Test SFTP Setup and then always get the following error:
Permission denied (publickey).
This has always been odd to me, because it never asked for the password I already set up. However, I am just now looking into this. Incidentally, I can’t get SFTP or SCP to work fully, either. I can connect, but when I want to transfer files, one way or another, I get a permissions error.
When I administer an EE server, I log in remotely, via SSH from my Mac OS X Terminal App, using a specific username and passphrase. I’m able to log in with said username and do most of what I need, unless it involves file transfer.
When I want to transfer files from the EE server, via SCP from my Mac OS X Terminal App, I can issue the following command:
scp -i ~/.ssh/my-ssh-key USERNAME@IP-ADDRESS:/var/www/DOMAIN.TLD/htdocs/wp-content/themes/THEME-NAME/images/IMAGE.jpg ~/Downloads/scp/
I am asked for my passphrase and, upon successful entry of the passphrase, the command successfully downloads IMAGE.jpg to my Mac OS X Downloads/scp directory - No Problem!
The problems begin when I need to push something back to my EE server; via SCP from my Mac OS X Terminal App. To do this I use something similar to:
scp -i ~/.ssh/my-ssh-key ~/Downloads/scp/welcome.jpg USERNAME@IP-ADDRESS:/var/www/DOMAIN.TLD/htdocs/wp-content/themes/THEME-NAME/images
I always get the following error:
Permission denied
Is there an easy way to fix any/all of these issues?