Hi I just created a new droplet from an old working snapshot.
For some reason I can’t connect to FileZilla using any of the old sftp users. I was hoping all I had to do was change the host IP in FileZilla to the new droplet IP and they would connect.
Any reason why it’s not working how I expected?
I also tried creating a new ftp user (testdroplet) but I get this error message -
Error: Could not connect to server
Here’s how I created the SFTP user testdroplet -
spock@droplet: sudo createhost
Domain (without www.): testdroplet.com
Username: testdroplet
New password: passwordhere
Retype new password: passwordhere
passwd: password updated successfully
New Virtual Host Created
Enabling site testdroplet.com
To activate the new configuration, you need to run:
systemctl reload apache2
Complete!
You now have a new Virtual Host
Your new host is: http://www.testdroplet.com
And its located at /sites/testdroplet/public_html
spock@droplet:
How can I connect to FileZilla using the testdroplet credentials?
The protocol is SFTP and port 22.
I can connect to FileZilla using the new droplet SSH user (spock).
Thanks for any help you can provide!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hi @twc8ac35a8636,
In order to use SFTP, you need to create a user to connect to. I see the createhost is some kind of a script so I’m not 100% sure but it doesn’t seem to create a new user with the Virtual Host in Apache2.
As said in order to use FTP or SFTP you need to use a user that’s existing in your Droplet. To create a new user and use if for SFTP, you need to follow the usual stuff:
To create the user
- sudo useradd -m <username>
To set it’s password
- sudo passwd <username>
if you need to add a specific home directory you’ll need to use this:
- sudo useradd -m -d <custom_home_dir_location> <username>
Where the custom_home_dir_location, let’s say /home/test would need to have the user’s ownership.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.