Configure SFTP on EE4 server


#1

Following this tutorial Configure SFTP on EE4 server I have configured my SFTP server but I am unable to get connected. I have reviewed the steps and still, I am unable. If I attempt to connect via FileZilla via 22 I get a message telling me Error: Authentication failed and if I try with 2222 I get Network error: Connection refused.

I took a copy of the private key and converted it to a ppk file for FileZilla to use while attempting to connect and I have even just tried to connect with a password and both of them keep saying auth failed.

I am running EE4 on Ubuntu 18.04.1 on a Digital Ocean droplet. Below is an example of my docker config file.

sftp:
    image: atmoz/sftp
    restart: on-failure
    volumes:
        - /opt/easyengine/sites/dev.cfimortgage.com/app/htdocs/:/home/sftpuser/upload
        - ./ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key
        - ./ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key
        - ./users.conf:/etc/sftp/users.conf:ro
    ports:
        - "2222:22"

#2

Give my image a try New SFTP user with limited rights


#3

Is that for setting up an sftp connection? It looks like ssh? I am still pretty new when it comes to linux but I am already able to connect via ssh from the default setup on DigitalOcean.


#4

Most Linux distros installs openSSH, whose features includes an SFTP server, so you can use either terminal or an FTP client to connect to your server. My image allows you to SSH/SFTP into a new container that’s using the same volume as whatever WP container you set it.


#5

I guess I am confused about your steps posted. How do I create a new user that has sftp access with your docker? How do I indicate what folders and rights they have?


#6

My image has already created the user www-data, which already has the proper permissions.


#7

Do I need to somehow remove the docker from the tutorial?


#8

No, those docker commands from my example is what will get SSH/SFTP to work.