AdminsForum
Guide CloudPanel SSH or SFTP Login Fails: Permission Denied and Connection Errors - Printable Version

+- AdminsForum (https://adminsforum.com)
+-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels)
+--- Forum: CloudPanel (https://adminsforum.com/Forum-cloudpanel)
+---- Forum: CloudPanel Guides & Tutorials (https://adminsforum.com/Forum-cloudpanel-guides-tutorials)
+----- Forum: CloudPanel Users, SSH & SFTP Guides (https://adminsforum.com/Forum-cloudpanel-users-ssh-sftp-guides)
+----- Thread: Guide CloudPanel SSH or SFTP Login Fails: Permission Denied and Connection Errors (/Thread-guide-cloudpanel-ssh-or-sftp-login-fails-permission-denied-and-connection-errors)



CloudPanel SSH or SFTP Login Fails: Permission Denied and Connection Errors - JAY - 10-23-2026

CloudPanel SSH or SFTP login fails: permission denied and connection errors

FileZilla says "Connection timed out", your terminal says "Permission denied (publickey)", or a user who logged in yesterday can't today. SSH and SFTP problems on CloudPanel come down to three things: the firewall, the user, and the login method. Here's how to work through them. For setting up users, see CloudPanel SSH, SFTP, FTP and File Manager.

The basics: which port and which user?
  • SSH and SFTP: port 22 (unless you changed it). SFTP is file transfer over SSH, so it uses the same port and users.
  • FTP: port 21, plus a passive port range. FTP and SFTP are different; use the matching protocol in your client.
  • Users: SSH/SFTP users are created per site in the site's SSH/FTP tab. FTP users are separate and have their own home directory.

Error 1: "Connection timed out"
Nothing answered. Almost always a firewall.
  • CloudPanel's firewall (Admin Area > Security): if you limited port 22 to your IP and your IP changed, you're blocked. Ask someone with access to update the rule, or use your VPS provider's web console to log in and fix it.
  • Your provider's cloud firewall, if you use one, must allow port 22 too.
  • Test from your computer:
    Code:
    nc -vz -w 5 YOUR_SERVER_IP 22
On the server (via the provider's console), check:
Code:
ufw status numbered ss -tlnp | grep sshd

Error 2: "Connection refused"
The server answered, but SSH isn't listening on that port. Maybe the SSH port was changed. Check
Code:
grep -i '^Port' /etc/ssh/sshd_config /etc/ssh/sshd_config.d/*.conf
and connect with
Code:
ssh -p NEWPORT user@server
.

Error 3: "Permission denied (publickey)"
The server only accepts SSH keys, and yours wasn't accepted. Some VPS providers switch off password logins by default.
  • Add your public key (
    Code:
    ~/.ssh/id_ed25519.pub
    on your computer) to the SSH user in the site's SSH/FTP tab. Paste the whole line, starting with
    Code:
    ssh-ed25519
    or
    Code:
    ssh-rsa
    .
  • Tell your client which key to use:
    Code:
    ssh -i ~/.ssh/id_ed25519 siteuser@YOUR_SERVER_IP
    . In FileZilla, add the key under Settings > SFTP.
  • Make sure you're using the right user name. Logging in as
    Code:
    root
    with a site user's key (or the other way round) fails.
Debug from your computer with
Code:
ssh -v siteuser@YOUR_SERVER_IP
; the last lines show which keys were tried and why they were refused.

Error 4: "Permission denied, please try again" (password)
Wrong password, or password logins are disabled on the server. Reset the user's password in the site's SSH/FTP tab (Generate new password makes a strong one). If password logins are off for the whole server, use an SSH key instead (Error 3).

Error 5: logged in, but can't see or change files
  • Each user only sees its own site's home folder. Files of other sites aren't visible; that's by design.
  • "Permission denied" when saving: the file belongs to root. Fix ownership as root:
    Code:
    chown -R siteuser:siteuser /home/siteuser/htdocs/example.com

FTP connects but the file list never loads
That's the passive port range. CloudPanel's firewall rule for FTP opens ports 20-21 and the passive range 49152-65534 for your IP. If your provider has a cloud firewall too, open the same range there. Also check the ProFTPD MasqueradeAddress setting mentioned in CloudPanel's docs if the server is behind NAT. Better still, use SFTP: one port, encrypted, fewer problems.

Sources: CloudPanel: SSH/FTP ยท OpenSSH: ssh manual


More CloudPanel troubleshooting
Applies to CloudPanel v2 on Ubuntu and Debian, October 2026. In the commands, replace
Code:
example.com
with your domain and
Code:
siteuser
with your site's user name (shown on the site's Settings page).