Guide: SSH: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
= | = Key Pair Generation and Import = | ||
<span id="Key-Pair-Creation"></span> | <span id="Key-Pair-Creation"></span> | ||
Revision as of 13:10, 23 October 2025
Key Pair Generation and Import
Generating an SSH Key Pair Locally
🐧 Linux / 🍎 macOS
Open a terminal and run the following command:
ssh-keygen -t rsa -b 4096 -f ~/.ssh/myKey
When prompted, enter a secure passphrase. Record it safely — without it, you won't be able to use the key pair.
This creates two files:
- Private key:
~/.ssh/myKey - Public key:
~/.ssh/myKey.pub
Secure the private key with correct permissions:
chmod 600 ~/.ssh/myKey
Now you can import your public key into the Dashboard.
🪟 Windows
Open Command Prompt (Click the Start menu, type cmd into the search bar and press Enter). Then run the following commands:
mkdir C:\Users\%USERNAME%\.ssh
ssh-keygen -t rsa -b 4096 -f C:\Users\%USERNAME%\.ssh\myKey
When prompted, enter a secure passphrase. Record it safely — without it, you won't be able to use the key pair.
This creates two files:
- Private key:
C:\Users\%USERNAME%\.ssh\myKey
- Public key:
C:\Users\%USERNAME%\.ssh\myKey.pub
Now you can import your public key into the Dashboard.
Importing an Existing SSH (Public) Key via Dashboard
To use a key you generated on your device:
- Log in to the Dashboard.
- Go to: Project → Compute → Key Pairs.
- Click Import Public Key.
- In the dialog:
- Enter a unique name.
- Make sure SSH Key is selected as the key type.
- Upload your public key file (e.g.,
myKey.pub) or paste the contents of it.
- Click Import Public Key.
Your public key name should now appear in the list and is ready for use.
Creating an SSH Key Pair via Dashboard
If you don’t have a key pair yet or prefer using the Dashboard:
- Log in to the Dashboard.
- Go to: Project → Compute → Key Pairs.
- Click Create Key Pair.
- In the dialog:
- Enter a unique name.
- Make sure SSH Key is selected as the key type.
- Click Create Key Pair.
The public key name should now appear in the list and the private key will be automatically downloaded — save it securely, as you won’t be able to download it again.