You can find more information about setting up an SSH key in Plesk in the blog post .
Was ist ein SSH Key?
An SSH key is a cryptographic key pair used for secure authentication in SSH connections. It consists of a private key and a public key.
Was ist der Unterschied zwischen Private Key und Public Key?
The private key is confidential and always remains stored locally on your device—it must never be shared. The public key is stored on the target system (e.g., the Plesk server) and can be shared without hesitation. In addition, the private key can be protected with a passphrase when it is created: If a passphrase is set, the key must be unlocked with it every time it is used, so that a stolen private key cannot be used without the passphrase.
Welche Vorteile bietet ein SSH Key gegenüber einem Passwort?
Three main advantages:
- Security: The private key is never sent over the network—this prevents brute-force attacks and password interception.
- Convenience: No password required that needs to be changed regularly—once set up, access is always convenient and secure.
- Automation: SSH keys enable passwordless authentication, which is ideal for scripts and automated connections.
Öffentlichen Schlüssel in Plesk hinzfügen
- Log in to the Plesk Control Panel.
- Select the domain you want to access via SSH.
- Search for “SSH Keys” and open the “SSH Key Manager” extension.
- Click “Add Key.”
- Paste the public key and save it.
- Test access using: ssh hauptbenutzer@domainbeispiel.ch
SSH Key erstellen – Windows mit PuTTYgen
- Download PuTTY from the official PuTTY website and install it.
If you’re already using PuTTY, PuTTYgen will already be installed. - Open PuTTYgen from the Start menu.
- Select the key type: ed25519
- Click “Generate.”
- Hover your mouse over the empty field to generate random data.
- Enter a passphrase (optional) and save the private key.
Example: “demo_key.ppk” (private key) – The file format must be *.ppk! - Manually create the file “demo_key.pub” (public key), copy the displayed public key into the file, and save it.
- Enter the public key on the target system. In this example, do so in the Plesk interface, in the SSH Key Manager (see Using the SSH Key Manager in Plesk).
- Open Pageant from the Start menu.
Pageant makes your SSH keys available to PuTTY and was also installed as part of the PuTTY package. - Right-click the Pageant icon on the taskbar and select “Add Key.”
Enter the passphrase if you’ve added one to the key. - Select the saved *.ppk key.
- Launch PuTTY and enter the Plesk server as the destination hostname. Click “Open” to establish the connection.
- The first time you connect to a server, a security warning will appear stating that the server is not yet recognized. Confirm this by clicking “Yes.”
- Enter your username when prompted.
This is the primary user for a domain. Only the primary user can connect via SSH. - The connection will now be established immediately, and you’ll be logged in via SSH.
Note: After restarting the system, you’ll need to restart Pageant and add your key again.
SSH Key unter Windows über die Git-Bash Sitzung erstellen
- Open the Bash
- Run the following command: “ssh-keygen -t ed25519 -C comment”
- Follow the instructions to name the key and set a passphrase (optional).
- The private and public keys are stored in the .ssh folder in your home directory in Bash.
- Enter the public key (*.pub) on the target system. In this example, do so in the Plesk interface, in the SSH Keys Manager.
- The key is now available in the Bash environment.
- Test the connection: “ssh hauptbenutzer@domainbeispiel.ch”
SSH Key unter Linux
- Open the Terminal.
- Run the following command: “ssh-keygen -t ed25519 -C comment”.
- Follow the instructions to name the key and set a passphrase (optional).
- The private and public keys are stored in the .ssh folder in your home directory.
- Enter the public key (*.pub) on the target system. In this example, do so in the Plesk interface, in the SSH Keys Manager.
- Test the connection: “ssh hauptbenutzer@domainbeispiel.ch”
SSH Key unter macOS erstellen
- Open the Terminal.
- Run the following command: “ssh-keygen -t ed25519 -C comment”.
- Follow the instructions to name the key and set a passphrase (optional).
- The private and public keys are stored in the .ssh folder in your home directory.
- Enter the public key (*.pub) on the target system. In this example, do so in the Plesk interface, in the SSH Keys Manager.
- Test the connection: “ssh hauptbenutzer@domainbeispiel.ch”