Web Hosting Knowledge Base Web Hosting Knowledge Base
  • Home
Get Started
Web Hosting Knowledge Base Web Hosting Knowledge Base
Get Started
Web Hosting Knowledge Base Web Hosting Knowledge Base
  • Home
loading
  1. Home
  2. Plesk Control Panel
  3. How to use SSH keys with Plesk
Updated on June 21, 2024

Plesk Control Panel

  • Folder icon closed Folder open iconHow to log in and out of Plesk
  • Folder icon closed Folder open iconHow to add new domains and subdomains in Plesk
  • Folder icon closed Folder open iconHow to manage databases and database users in Plesk
  • Folder icon closed Folder open iconGetting started with the Plesk File Manager
  • Folder icon closed Folder open iconHow to manage DNS zones in Plesk
  • Folder icon closed Folder open iconHow to access webmail in Plesk
  • Folder icon closed Folder open iconHow to manage e-mail accounts in Plesk
  • Folder icon closed Folder open iconHow to configure an e-mail forwarder in Plesk
  • Folder icon closed Folder open iconHow to configure an e-mail alias in Plesk
  • Folder icon closed Folder open iconHow to enable auto-reply messages for an e-mail account in Plesk
  • Folder icon closed Folder open iconHow to use the Plesk spam filter
  • Folder icon closed Folder open iconHow to manage e-mail deliverability settings in Plesk
  • Folder icon closed Folder open iconHow to set up Gmail as the e-mail provider in Plesk
  • Folder icon closed Folder open iconGetting started with Plesk
  • Folder icon closed Folder open iconPlesk e-mail features
  • Folder icon closed Folder open iconHow to manage FTP accounts in Plesk
  • Folder icon closed Folder open iconHow to back up and restore sites in Plesk
  • Folder icon closed Folder open iconHow to generate a CSR and install an SSL certificate in Plesk
  • Folder icon closed Folder open iconHow to manage users in Plesk
  • Folder icon closed Folder open iconHow to use Plesk to protect directories with a password
  • Folder icon closed Folder open iconHow to schedule tasks in Plesk
  • Folder icon closed Folder open iconHow to use the WordPress Toolkit in Plesk
  • Folder icon closed Folder open iconHow to generate and renew Let’s Encrypt SSL certificates in Plesk
  • Folder icon closed Folder open iconHow to use Plesk to stage websites
  • Folder icon closed Folder open iconHow to switch PHP versions and settings on Plesk
  • Folder icon closed Folder open iconHow to redirect users to SSL connections in Plesk
  • Folder icon closed Folder open iconHow to use Git with Plesk
  • Folder icon closed Folder open iconHow to view and filter logs in Plesk
  • Folder icon closed Folder open iconHow to remove password protection from the site statistics page
  • Folder icon closed Folder open iconHow to install a self-signed SSL certificate in Plesk
  • Folder icon closed Folder open iconHow to use SSH keys with Plesk
  • Folder icon closed Folder open iconHow to view resource usage information in Plesk
  • Folder icon closed Folder open iconHow to change your Plesk password
  • Folder icon closed Folder open iconHow to manage user roles in Plesk

How to use SSH keys with Plesk

Estimated reading: 3 minutes 135 views

The Plesk control panel does not have graphical tools to manage ssh keys. This article provides step-by-step instruction to create and manage ssh keys from the command line.

Plesk is no longer included with new Hostvento Hosting plans, but it is still available on legacy Managed WordPress accounts. You can install Plesk manually on unmanaged VPS and Dedicated servers.

The following instructions work with the Windows Subsystem for Linux, the Macintosh terminal, or the Linux command line.

Creating SSH keys

The following steps show how to create an SSH key on your local computer and upload the public key to the server.

  1. At the command prompt on the local computer, change to the .ssh directory with this command.Copyuser@computer ~$ cd ~/.ssh If the .ssh directory does not exist, you can create it with this command:Copyuser@computer ~$ mkdir ~/.ssh
  2. When you have changed to the .ssh directory, type this command, replacing mykey with a file name of your choice.
    Copyuser@computer ~$ ssh-keygen -t rsa -b 2048 -f mykey The command will prompt for a passphrase during creation of the key. Adding a passphrase makes the key more secure but keys with passphrases cannot be used for automation. When the command completes, a public key named mykey.pub and a private key named mykey will be created in the .ssh directory.
  3. Copy the public key to your server using the ssh-copy-id command. Replace mykey.pub with the name you chose in the previous step. Replace user with your username on the server and replace example.com with your domain name or the IP address of the server.
    Copyuser@computer ~$ ssh-copy-id -i mykey.pub -p 7822 user@example.com You will be prompted for your password to log in. The public key will be copied to the ~/.ssh/authorized_keys file on the server.
  4. Once the file has been copied, you should be able to login using the following command without typing your password: Replace mykey with the name of your key file, replace user with your username on the server and replace example.com with your domain name or the IP address of the server.
    Copyuser@computer ~$ ssh -i ~/.ssh/mykey -p 7822 user@example.com

Appending SSH keys

You may want to allow others to access your account or provide access to a remote service that provides their own public key. The public key may be provided as a file or you may need to cut and paste it into a file. If the file is created by pasting the key into a file, be sure there are no extra characters before or after the key. The key must be appended to the authorized_keys file on the server. To append a key, follow these steps.

  1. Save or create the public key file in any convenient directory. In this example the users home directory is used. The filename should have the .pub extension.
  2. Open the command prompt to the users home directory and use the ssh-copy-id command to copy the key to the server. Replace somekey.pub with the name of the file created in the previous step. Replace user with your username on the server and replace example.com with your domain name or the IP address of the server.Copyuser@computer ~$ ssh-copy-id -i somekey.pub -p 7822 user@example.com

Still stuck? How can we help?

How can we help?

Was this page helpful? Yes No

Share this Doc

How to use SSH keys with Plesk

Or copy link

Clipboard Icon
CONTENTS
Leaf Illustration

© 2023 All Rights Reserved by Hostvento