Skip to main content

Why SSH Keys?

SSH keys are more secure than passwords:
After setup, you can connect without entering a password - faster and more secure!

Create SSH Key

Windows 10/11 (PowerShell)

1

Open PowerShell

Press Win + X and select Windows Terminal or PowerShell.
2

Generate SSH Key

ED25519 is the most modern and secure algorithm. If your server doesn’t support it, use RSA:
3

Confirm Location

Press Enter for the default location.
4

Set Passphrase (recommended)

A passphrase adds extra protection to your key. You can also press Enter for no passphrase.
5

Copy Public Key

Copy the entire output (starts with ssh-ed25519).

PuTTYgen (Alternative)

1

Open PuTTYgen

Install PuTTY and open PuTTYgen.
2

Generate Key

  1. Select EdDSA (or RSA with 4096 bits)
  2. Click Generate
  3. Move your mouse in the empty area for randomness
3

Save Keys

  1. Save private key → Save as .ppk file
  2. Copy the text in the upper field (Public Key)

Add Public Key to Server

Now you need to add your Public Key to the server. The easiest way - works on macOS and Linux:
You’ll be asked for the password once. After that, the key is set up.

Method 2: Manual Copy

1

Log in with Password

2

Create SSH Directory (if needed)

3

Add Public Key

Replace YOUR-PUBLIC-KEY-HERE with the copied key (starts with ssh-ed25519 or ssh-rsa).
4

Test Connection

Open a new terminal and connect:
If there’s no password prompt, the key works!

Disable Password Login

First test that your SSH key works! Otherwise you’ll lock yourself out.
After successful key setup, you can disable password login:
1

Edit SSH Configuration

2

Change Settings

Find and change these lines:
Use Ctrl + W in nano to search.
3

Restart SSH Service

4

Test in New Terminal

Open a new terminal (keep the old one open!) and test:
If it works, you can close the old terminal.

Manage Multiple Keys

SSH Config File

For multiple servers with different keys, create ~/.ssh/config:
Now you can simply connect with:

Troubleshooting

Possible causes:
  • Public key not copied correctly
  • Wrong permissions on server
  • Wrong key being used
Solution:
The SSH agent has no key loaded.Solution:
Check on server:
The key must be on a single line and start with ssh-ed25519 or ssh-rsa.
Unfortunately, the passphrase cannot be recovered.Solution:
  1. Generate a new key
  2. Add the new public key to the server
  3. Delete the old key

Best Practices

🔐 Use a Passphrase

A passphrase protects your key if someone gains access to your computer.

🔄 Rotate Keys

Regularly create new keys and remove old ones from authorized_keys.

💾 Backup

Back up your private key in a secure location. Without it, you’ll lose access!

🚫 Never Share

Never share your private key. Only the public key is copied to servers.

Next Steps

Configure Firewall

Protect your server with firewall rules

API Reference

Automate with our REST API