Guide: SSH
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.