Guide: SSH: Difference between revisions

From bwCloud-OS
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:
* '''Private key''': <code>~/.ssh/myKey</code>
* '''Private key''': <code>~/.ssh/myKey</code>
* '''Public key''': <code>~/.ssh/myKey.pub</code>
* '''Public key''': <code>~/.ssh/myKey.pub</code>
Secure the private key with correct permissions:
'''Note''': If you copy the key pair to or from another system, ensure that the private key has correct (restricted) permissions:


<code>chmod 600 ~/.ssh/myKey</code>
<code>chmod 600 ~/.ssh/myKey</code>


Now you can [[#Importing an Existing SSH (Public) Key via Dashboard|import your ''public'' key into the Dashboard]].
Now you can [[#Importing an Existing SSH (Public) Key via Dashboard|import your ''public'' key into the Dashboard]].
Line 39: Line 40:


* '''Public key''': <code>C:\Users\%USERNAME%\.ssh\myKey.pub</code>
* '''Public key''': <code>C:\Users\%USERNAME%\.ssh\myKey.pub</code>
'''Note''': If you copy the key pair to or from another system, ensure that the private key has correct (restricted) permissions:
<code>icacls "%USERPROFILE%\.ssh\myKey" /inheritance:r /grant:r "%USERNAME%:(R,W)"</code>
Now you can [[#Importing an Existing SSH (Public) Key via Dashboard|import your ''public'' key into the Dashboard]].
Now you can [[#Importing an Existing SSH (Public) Key via Dashboard|import your ''public'' key into the Dashboard]].



Revision as of 14:10, 30 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

Note: If you copy the key pair to or from another system, ensure that the private key has correct (restricted) 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

Note: If you copy the key pair to or from another system, ensure that the private key has correct (restricted) permissions:

icacls "%USERPROFILE%\.ssh\myKey" /inheritance:r /grant:r "%USERNAME%:(R,W)"


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:

  1. Log in to the Dashboard.
  2. Go to: Project → Compute → Key Pairs.
  3. Click Import Public Key.
  4. 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.
  5. 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:

  1. Log in to the Dashboard.
  2. Go to: Project → Compute → Key Pairs.
  3. Click Create Key Pair.
  4. In the dialog:
    • Enter a unique name.
    • Make sure SSH Key is selected as the key type.
  5. 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.