How to enable sFTP in a Linux VPS?

The SSH File Transfer Protocol (SFTP), also known as the Secure File Transfer Protocol, enables secure file transfer capabilities between networked hosts. Unlike the Secure Copy Protocol (SCP), SFTP additionally provides remote file system management functionality, allowing applications to resume interrupted file transfers, list the contents of remote directories, and delete remote files.

The command-line secure file transfer program (sftp) and graphical SFTP clients, such as Filezilla, WinSCP and Fetch, use SSH2 encryption to authenticate and establish secure channels between networked hosts. Although SFTP clients are functionally similar to FTP clients, they employ different protocols; consequently, you cannot use a standard FTP client to connect to an SFTP server.
 
Note: You can only have only a single sftp account in one cPanel. You can't have multiple sftp in one cPanel.
 

How to generate SSH key from your VPS.

 

  1. Login into WHM with root user and access cPanel account from WHM.
  2. Once you are in the cPanel account, goto Security >> SSH Access.

    cPanel Dashboard

  3. In the new page, click on Manage SSH Keys button.

    Manage SSH Keys

  4. Click the Generate a New Key button at the top of the window.

    Generate SSH Keys

  5. Fill in the requested information to generate the key.

    SSH Keys Information

  6. You should now have both a Public and Private Key generated. You can find the keys in the .ssh folder. Save them on your local computer.

    SSH Keys Generated


Now we will need to setup FTP client to use SFTP. Please follow below steps to configure it in Filezilla.

  1. Open Filezilla and goto Edit >> Settings.

  2. In the setting menu, select the SFTP option and click on Add key file.

    SFTP Settings

  3. Now, browse the Key file you recently downloaded from cPanel.

    NOTE: If your key is already a .ppk file you should be fine if not FileZilla will ask to convert it. click on Yes to convert.

    Add Key In Filezilla

  4. Once you click on Yes to convert file, it will ask password. You need to provide the same password used while creating the key and click on Ok.

    Provide SFTP Key Password

  5. Now provide the filename for converted key and click on Save. You will see the key is added. Click on Ok to save settings.

    SFTP Key Added

That's it!!! Now you should be able to SFTP to your server.


  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to Install Java on Ubuntu 18.04 ?

Java is a programming language developed by Sun Microsystems. There are lots of applications and...

How to Install OpenJDK JAVA 11/8 on Ubuntu?

You can follow this tutorial to install JAVA OpenJDK in all the Ubuntu versions. Following are...

How to install IonCube Loader on CentOS 7 Manually?

Ioncube is a PHP module which protects the PHP application's source code from being viewed from...

How to install the Zabbix agent version 3.0 on Debian 9 (strech)?

Zabbix is an Open-source monitoring tool use to monitor the health of servers, networks and other...

Is HTML5 Supported in Your Servers?

Since HTML content has nothing to do with the web server, there are no special requirements...