How to configure SFTP on cPanel

File Transfer Protocol (aka FTP), is one of the oldest and most common ways to upload and download files from an FTP server. cPanel by default includes FTP connections for all their accounts and customers. However, FTP is not secure at all as it sends all your user/password information un plain text. That’s why today we are going to show you how to configure SFTP on cPanel.

cPanel hasn’t built SFTP access by default for all their cPanel accounts, it should be really secure to prevent all kind of FTP hacks. In the meantime, you can setup this manually by enabling SSH access, that will lead to open full access to your SFTP account.

How to setup SFTP on cPanel

SFTP provides a fully encripted connection that uses a SSH connection to upload and download files, it requires an Sftp client, sftp Port and SSH server on the remote host. On cPanel sftp configuration needs some tweaking but it can be done within a few minutes.

SFTP Configuration Explained

If you have root login on your server you can setup SFTP on cPanel easily.
Open any FTP client (yes, an FTP client like FileZilla), then choose the protocol and set SSH2 or SFTP.
Then, try to connect using your server data:

  • Hostname: this must be a valid hostname or IP address, for example:
  • SSH port number: usually is 22, but if you changed your SSH port it may be different.
  • Username: root or any cpanel user with shell access.
  • Password: your user password here
  • Private Key: if you are using private keys, then set the absolute path of your private key here.

You don’t need any additional configurations, as if you can connect via SSH from your host, you should be able to connect via SFTP too as it uses the same protocol.

Further reading:

About the Author: Santiago Borges

Experienced Sr. Linux SysAdmin and Web Technologist, passionate about building tools, automating processes, fixing server issues, troubleshooting, securing and optimizing high traffic websites.

Leave a Reply

Your email address will not be published. Required fields are marked *