Question: How do I generate SSH keys? Print

  • best hosting provider, shared hosting guide, GHFS web hosting, GHFS cloud hosting, VPS hosting setup, GHFS Hosting, DNS configuration guide, managed hosting services, how to transfer a domain, how to register a domain, hosting control panel tutorial, domain and hosting tutorials, hosting knowledge base, SSD web hosting, SSL installation guide, DNS records explained, MX record setup, CNAME configuration, email hosting setup, SSL certificate troubleshooting, A record guide, WordPress installation GHFS, WordPress migration guide, optimize WordPress performance, fix internal server error, enable SSH access, FTP upload guide, Linux server commands, secure VPS server, MySQL database tutorial, PHP configuration guide, malware removal guide, website security tutorial, DDoS protection GHFS, firewall configuration VPS, secure hosting best practices, disable root login SSH, VPS hosting tutorial, how to manage Linux VPS, cloud server configuration, Nginx setup GHFS, Apache configuration guide, install Docker on VPS, Redis installation, Python hosting tutorial, Node.js on VPS, MySQL optimization, hosting troubleshooting guide, SSL troubleshooting, email deliverability guide, secure website setup, hosting performance optimization, server hardening tutorial, cPanel tutorial, Plesk tutorial, SMTP configuration guide
  • 0

Use:

SSH keys allow you to securely access your server without using a password. They are required for secure remote login, Git deployments, automation tools, and VPS management.

This article explains how to generate SSH keys on Windows, macOS, and Linux, and how to use them on GHFS Hosting.


1. What You Need Before Generating SSH Keys

  • A computer (Windows, macOS, or Linux)

  • SSH access to your hosting plan (VPS or Shared plans that support SSH)

  • Terminal or SSH client (PuTTY for Windows if needed)


2. Generate SSH Keys on Windows (Using PowerShell or Git Bash)

Steps:

  1. Open PowerShell or Git Bash

  2. Run the following command:

 
 
ssh-keygen -t ed25519 -C "your_email@example.com"

If ED25519 is not supported:

 
 
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
  1. When asked for a file location, press Enter

  2. Choose a passphrase (optional but recommended)

  3. Keys will be created in:

 
 
C:\Users\YourName\.ssh\

You will see two files:

  • id_ed25519 (private key)

  • id_ed25519.pub (public key)


3. Generate SSH Keys on macOS or Linux

Steps:

  1. Open Terminal

  2. Run:

 
 
ssh-keygen -t ed25519 -C "your_email@example.com"

Or RSA:

 
 
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
  1. Press Enter to save to default location

  2. Optional: Set a passphrase

  3. Keys are stored in:

 
 
~/.ssh/

Files created:

  • id_ed25519 (private key)

  • id_ed25519.pub (public key)


4. Adding Your Public Key to GHFS Hosting (Plesk)

Steps:

  1. Log in to Plesk

  2. Go to Websites & Domains

  3. Click SSH Access (or "Web Hosting Access")

  4. If your plan supports SSH, find the option to add Authorized Keys

  5. Open your public key file:

 
 
id_ed25519.pub
  1. Copy its full content

  2. Paste it into the Authorized Keys field in Plesk

  3. Save

You can now log in via SSH without a password.


5. Logging in With Your SSH Key

Windows (PowerShell or Git Bash):

 
 
ssh username@yourserverip

macOS / Linux:

 
 
ssh username@yourserverip

If keys are stored in a non-default location:

 
 
ssh -i /path/to/private_key username@yourserverip

6. Protect Your Private Key

Very important:

  • Never share your private key

  • Only upload your public key

  • Do not email or store private keys online

  • Set correct permissions:

 
 
chmod 600 ~/.ssh/id_ed25519 chmod 700 ~/.ssh

7. Troubleshooting Common SSH Key Issues

“Permission denied (publickey)”

Possible causes:

  • Wrong username

  • Public key not added to Plesk

  • Private key permissions incorrect

  • Uploading the private key instead of public key

“Key is not in OpenSSH format”

Convert using:

 
 
ssh-keygen -i -f keyfile

Cannot locate key

Ensure your key is in:

 
 
~/.ssh/id_ed25519

8. When to Contact GHFS Hosting Support

Contact support if:

  • SSH access is not enabled on your hosting plan

  • Your key does not work even after adding it

  • You want help setting correct permissions

  • You are unsure which username to use for SSH

  • You need SSH for Git deployment or automation

Support can check server-level configuration and assist you.


Was this answer helpful?

« Back