After reading this article, you will be completely familiar with Create a FTP Account with SSH on Dedicated Server. To be able to setup a functional and fully secure FTP server with key components in minutes without wasting time, follow the given instructions:
Before starting work, we recommend you visit the Cheap Dedicated Server plans presented on our website and choose a plan. Then you will easily be able to Create a FTP Account with SSH on Dedicated Server.
In this section, we will examine step by step how to create an FTP account using SSH.
1- In the first step, to access FTP you should install the vsftpd package. But if you have installed that before then skip this part:
sudo apt-get install vsftpd
2- Your second step, will be to change the configuration setting for vsftpd. For this, you need to open /etc/vsftpd.conf with your favorite text editor which here is nano:
Sudo nano /etc/vsftpd.conf
3- Here, in this file, you should change the setting below:
Listen=YES
By this action, you order vsftpd to run as a standalone daemon (the simplest way to run).
Anonymous-Enable=NO
This function prohibits anonymous FTP users. These users are preferred for security reasons.
Local-Enable=YES
This function also allows the user’s accounts defined in the /etc/passwd file to access the FTP server.
Write-Enable=YES
This one is given by default. But removing the hash (#) will cause the files to be uploaded to the FTP server.
Chroot_Local_User=YES
It causes users to be selected to the main directory and is also set by default.
If you want to test your setting and make sure that everything is working well, make the following setting for the above parameters:
listen=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
chroot_local_user=YES
Now you have to save the vsftpd.conf file and then you can run the vsftpd service again with the commands in this section:
sudo service vsftpd restart
Here, you should add a user using the below command:
sudo adduser testes
Now you have to permit the user that you have created, so use the following command:
sudo chown root:root /home/testuser
You can assign the directory to the user here:
usermod --home /var/www/html/test-dir/testuser
Use this command to restart vsftpd service:
sudo service vsftpd restart
Now you create a user, open FileZilla, and connect the user as you see in this image:
In this part, you can check if the user has been connected to the folder assigned or not:
And if you are about to update the user folder again use the command below:
usermod -d /var/www/html/test-dir testuser
sudo service vsftpd restart
To update your FTP user password, you have to apply this command:
passwd testuser
You can permit the folders for the new user by running the following command:
chmod -R 755 /var/www/html/test-dir
Here you will learn how to delete an FTP user on a dedicated server:
userdel testuser
And the last command shows how to delete a user with a directory:
userdel -r testuser
That’s it. Now you are able to add or configure any FTP user on a dedicated server.
Now that you find out how to add a FTP user with SSH on a dedicated server, you are able to add extra users. Also, you learned how to delete users here. Hope this article will help you. If you have any questions or ideas, please add a comment.
Anonymous FTP, which is the most basic form of it. It provides support for data transfer without encrypting data or using a username
How useful was this post?
Click on a star to rate it!
Average rating 0 / 5. Vote count: 0
No votes so far! Be the first to rate this post.
Helm is a powerful package manager for Kubernetes, allowing users to easily manage and deploy applic...
Here we are in 2023 and as you are well aware, in today's highly competitive digital landscape,...
What is your opinion about this Blog?