SSH access: set up and connect
SSH access is enabled on your hosting. Login works exclusively with an SSH key pairTwo matching key files: the private key stays with you, the public key is stored on the server. Only together do they allow a login.. Password login is disabled for security reasons. Once set up, you can use the same key on as many servers as you like.
Unlike the panel ports, port 22 is permanently open, so you do not need to unlock SSH in the customer center. This keeps inventory management systems, deployments and other automated access working without a customer center login.
Prerequisites
Section titled “Prerequisites”- Access to the hosting panel. See Logging in to the hosting panel.
- A terminal (macOS, Linux and Windows 10+ include OpenSSH) or PuTTY as an alternative on Windows.
Create and add the key
Section titled “Create and add the key”Plesk has no built-in key generator. You create the key pair locally and add the public key.
- Create a key pair locally. In the terminal:
Set a passphraseSeparate password for the private key file. It protects the key if it falls into the wrong hands. Not the same as your FTP or panel password. when prompted.
Terminal window ssh-keygen -t ed25519 -f ~/.ssh/rackspeed -C "your-comment" - Copy the contents of the public key (
~/.ssh/rackspeed.pub) to the clipboard:Terminal window cat ~/.ssh/rackspeed.pub - Add it in Plesk with the
SSH Keys Managerextension (in the left sidebar or underExtensions):Add Key, paste the contents, save. - Alternatively, do it manually: use the
File Managerto create the file.ssh/authorized_keysin your home directory and add the public key as a separate line.
Your SSH username is the system user of your subscription. You find it in Plesk under Websites & Domains → Web Hosting Access.
cPanel includes a key generator, so you do not need to create anything locally.
- In cPanel, open
SSH Access → Manage SSH Keys. - Click
Generate a New Key. Enter a name and a passphraseSeparate password for the private key file. It protects the key if it falls into the wrong hands. Not the same as your FTP or panel password.. You can keep the default settings for type and size. - Authorize the new key: in the list of public keys, click
Manage → Authorize. Without this step, the server rejects the key. - Download the private key and save it locally under
~/.ssh/(macOS/Linux) or in a secure location (Windows).
Your SSH username is your cPanel user.
Connect
Section titled “Connect”- Set restrictive file permissions on the private key (macOS/Linux; not needed on Windows):
Terminal window chmod 0600 ~/.ssh/YOUR-KEY - Connect:
Terminal window ssh -i ~/.ssh/YOUR-KEY USER@yourdomain.comYOUR-KEYis the file name of your private key,USERis your panel or system user. - On the first connection, SSH asks whether you trust the server. Confirm with
yes. Then enter the key’s passphrase.
- Start PuTTY and, on the left, open the menu path
Connection → SSH → Auth → Credentials. - Use
Browseto select your private key in thePrivate key file for authenticationfield. - Go back to
Sessionand enter the connection details: hostyourdomain.com, port22. - Click
Open. You are prompted for the username and passphrase interactively.
Troubleshooting
Section titled “Troubleshooting”No supported authentication methods available (server sent: publickey,…)
Section titled “No supported authentication methods available (server sent: publickey,…)”The server did not receive a matching key. Either the -i argument is missing (or the key in PuTTY), or the key is not added/authorized.
Solution: cPanel: check whether the key shows as authorized under Manage SSH Keys. Plesk: check whether the complete public key (one line!) ended up in the extension or in authorized_keys.
WARNING: UNPROTECTED PRIVATE KEY FILE!
Section titled “WARNING: UNPROTECTED PRIVATE KEY FILE!”The key file is readable by other users, so SSH refuses to use it.
Solution: Run chmod 0600 ~/.ssh/YOUR-KEY and connect again.
Permission denied despite a correct key
Section titled “Permission denied despite a correct key”Usually the wrong username.
Solution: Use the cPanel user or the Plesk system user of the subscription, not your email address and not your customer center login.
Related articles
Section titled “Related articles”- Use the correct PHP version on the shell: the most common reason you need the shell in the first place.
- Logging in to the hosting panel: if you have not been in the panel yet.
- Websites & web servers: more topics about files and server access.
Still stuck?
Section titled “Still stuck?”If the connection fails even though the key is added: open a ticket in the customer center. Include the complete error message. For SSH problems, the ideal addition is the output of ssh -v -i ~/.ssh/YOUR-KEY USER@yourdomain.com (verbose mode).