Introduction:


FTP is one of the main services you will most likely need when administering your VPS server. It is the de-facto service most administrators use to upload, download and manage file content to/from the server.

 

It is also important that everyone knows that FTP is an non-secured protocol, that it transmits data that can be captured during network transit of packets. Therefore, SFTP should be used as a secure alternative to FTP. Notice that we are going to install vsftpd which stands for "very secure" FTP daemon/service.

 

In order to set this up, you need to install the service and adjust some basic settings according to your needs, as follows:

 

Install vsftpd:


You can install vsftpd on your virtual private server through the command line interface (CLI) and SSH with the following command:

 

sudo yum install vsftpd

 

Most likely, you will also need to connect to a FTP server from your VPS, therefore, you need to install the FTP client as well:

 

sudo yum install ftp

 

The installer will start to download and setup all dependencies. Once it has finished with the downloading, vsftpd will be installed on your VPS. The vsftpd service will be installed with a reasonable amount of security and be ready to use, but it provides anonymous users access, something we believe has to be disabled to provide even a stronger security environment.

 

Configure vsFTPd


Once vsftpd has been installed, you can adjust the configuration to suit your specific needs. You can open up the configuration file with your favorite text editor, here we use vi.

 

sudo vi /etc/vsftpd/vsftpd.conf

 

First of all, disable anonymous user access by changing "Anonymous_enable" to "NO"

 

anonymous_enable=NO

 

Then you should uncomment the "local_enable" option by changing it to "YES".

local_enable=YES

 

Now, uncomment the option "chroot_local_user" and set it to "YES".

chroot_local_user=YES

 

With this chroot_local_user set to YES, all local users will be jailed within their chroot and will be denied access to any other part of the VPS server.

 

Now you need to restart the vsftpd service:

sudo service vsftpd restart

 

Access the FTP server

Now that you've finished installing vsftpd service on your VPS server you can access it and start uploading or downloading files to the server.

One way to access your FTP server is by typing the domain name or IP address into the address line of your browser.

ftp://myVPS.com

 

Alternatively, you can connect to the FTP server through the command line by typing

ftp myVPS.com

 

Once connected, you will be required to provide your username and password. Once credentials are validated by the server, you will be granted access to your users account disk space on the VPS.

 

Test on a Miami VPS Now

or

Deploy on a Miami Dedicated Server

Was this answer helpful? 4 Users Found This Useful (13 Votes)