FTP TUTORIALS & GUIDES

How to set up and Use SFTP with cPanel

Learn how to use SFTP with cPanel for encrypted website file transfers. Follow clear steps to verify SSH access, find your server hostname and port, configure FileZilla, WinSCP, Cyberduck, or another SFTP client, connect with a password or SSH key, manage files securely, and troubleshoot connection problems.

Updated: June 20, 2026
By: RSH Web Editorial Staff

Hosting from $2.99/mo
  See Plans    Contact Us

Menu

How to Set Up and Use SFTP with cPanel

Learn how to use SFTP with cPanel for encrypted website file transfers. Verify SSH access, find your hostname and port, configure FileZilla, WinSCP, Cyberduck, or another SFTP client, connect with a password or SSH key, manage files securely, and troubleshoot connection problems.

Secure File Transfer Protocol

SFTP (Secure File Transfer Protocol) transfers files between your computer and a web server using SSH. Unlike standard FTP, SFTP encrypts both data and credentials. Use it to upload content, run backups, or sync files on a cPanel server when SSH access is enabled.

Important: SFTP is a separate SSH protocol. A newly created cPanel FTP account does not automatically have SFTP access. SFTP normally uses the primary cPanel/SSH account (or another SSH-enabled system account) on port 22.

Why Use SFTP with cPanel?

Encryption

SFTP encrypts data and login credentials. Securing FTP Transfers

Single Port

Uses SSH, typically port 22, which is simpler for firewalls than FTP’s multiple data ports.

Authentication

Supports passwords or SSH keys. SSH Access Interface

Reliability

Stable transfers for large files, with resume support in many clients.

Prerequisites

  • 1cPanel Access: URL, username, and password from your host.
  • 2SSH Access: Confirm the host enables SSH/SFTP and note the port (commonly 22).
  • 3SFTP Client: FileZilla, WinSCP, Cyberduck, or similar. Choosing the Right FTP Client
  • 4Server Details: Hostname or IP, SSH username, and password or private key.

Step-by-Step Guide

Step 1: Create an FTP Account (Optional)

Use this for FTP/FTPS with restricted directories. SFTP still requires an SSH-enabled account.

  1. In cPanel go to Files → FTP Accounts.
  2. Enter Log In, Domain, Password, Directory (e.g., public_html/subfolder), and Quota.
  3. Click Create FTP Account. Create an FTP Account
Step 2: Enable SSH Access and Generate SSH Keys
  1. Go to Security → SSH Access.
  2. Click Manage SSH Keys, then Generate a New Key.
  3. Set Key Name (often id_rsa), optional password, type (RSA), and size (2048 or 4096).
  4. Click Generate Key. Download the public and private keys.
  5. Authorize the public key in cPanel.
  6. Store the private key securely (e.g., id_rsa.ppk for FileZilla).

Tip: Key authentication avoids storing account passwords in the SFTP client.

Step 3: Configure an SFTP Client

FileZilla example:

  1. Install FileZilla from the official site.
  2. Open File → Site Manager (Ctrl+S).
  3. Create a new site: Protocol SFTP - SSH File Transfer Protocol, Host, Port 22, Logon Type Normal or Key File, User (cPanel/SSH username).
  4. Connect and accept the host key for a trusted server.
  5. Open /home/user/public_html and transfer files. Set Up FileZilla
Step 4: Transfer Files Securely
  • Upload/Download: Drag files between local and remote panes.
  • Manage Files: Rename, delete, or set permissions (644 files, 755 directories).
  • Monitor Transfers: Use the queue to track progress and resume interrupted transfers.

Security Best Practices

  • Use SSH Keys instead of passwords when possible.
  • Restrict Directory Access on FTP/FTPS accounts. Create an FTP Account
  • Monitor Connections in FTP Connections.
  • Disable Anonymous FTP in cPanel’s Anonymous FTP interface.

Troubleshooting Common SFTP Issues

IssueWhat to Check
Connection FailuresHostname, port 22, SSH username, and that SSH is enabled.
Authentication ErrorsKey permissions (e.g., chmod 600 on the private key) and authorized public key in cPanel.
Directory Access IssuesThe folder exists and permissions are correct (755 for directories).
Firewall BlocksPort 22 must be open on the local network and server.
Slow TransfersConnection quality and client transfer limits.

cPanel Tools and Automation

Frequently Asked Questions

What is SFTP in a cPanel account?

SFTP is SSH File Transfer Protocol. It encrypts the login and the files on one port, usually 22. It is not the same as FTP or FTPS. You need SSH enabled on the hosting account and an SFTP client such as FileZilla, WinSCP, or Cyberduck. A side-by-side comparison is in FTP vs SFTP vs FTPS.

Can a separately created FTP account use SFTP?

Usually no. Extra cPanel FTP users are for FTP or FTPS and do not automatically receive SSH. SFTP typically uses the primary cPanel username or another SSH-enabled system account. If SFTP fails with user@yourdomain.com, connect that login with FTPS instead. Create limited FTP users with an FTP account in cPanel.

How do I know if SSH is enabled?

Open Security → SSH Access in cPanel. If the host has not turned SSH on, SFTP will time out on port 22 no matter which client you use. Ask the provider to enable SSH and confirm the port, which is often 22 but can differ. Until then, use explicit FTPS for extra FTP accounts. More hardening tips are in securing FTP transfers.

Should I use an SSH key or a password for SFTP?

A key is stronger for frequent or scripted logins. Generate it in cPanel under Manage SSH Keys, authorize the public key, and point the client at the private key. FileZilla may convert the key; WinSCP often wants a .ppk file from PuTTYgen. Keep the private key off the web root and off shared computers. Password login still works when keys are not set up.

Which client should I use for SFTP with cPanel?

FileZilla works on Windows, macOS, and Linux. WinSCP is the stronger free Windows choice for scripts, sync, and keys. Cyberduck is a good bookmark-style client on Windows and Mac. Set the protocol to SFTP, port 22, and the SSH-enabled username. Client options are compared in choosing an FTP client.

What should I enter for host, user, and port?

Use the hostname or IP from your host, not a guessed ftp. subdomain if that name fails. For SFTP use the primary cPanel username unless the host documents another SSH user. Port 22 is the default. Save these values in Site Manager or a bookmark so later sessions stay on SFTP. FileZilla steps are in FileZilla setup.

Why does SFTP fail when FTPS works?

FTPS uses the FTP service on port 21. SFTP uses SSH on port 22 and a different account type. A working FTPS login does not prove SSH is open. Check SSH Access, the port, and whether you are using an extra FTP user. If SSH cannot be enabled, keep using FTPS. Connection checks are in FTP troubleshooting.

Can I automate SFTP backups?

Yes, when SSH is available. WinSCP scripts and cPanel cron jobs can copy files over SFTP on a schedule. Use a key instead of a password when possible, and point the job at one folder rather than the whole account. Test a manual run first. Ideas are in automating file transfers, with more articles on the blog index.

Add Comment

* Required information
Drag & drop images (max 3)

Comments

No comments yet. Be the first!

Crafted by our talented master copywriters

RSH Web Services hosting plans are carefully crafted to meet the needs and demands of all types of websites, from personal to business websites. we are committed to providing you with the best hosting services available in the industry