Skip to main content

Guide to Generating and Using SSH Keys

Secure Shell (SSH) keys are an essential tool for secure communication between your computer and a remote server, like a GPU VM on Ori. This guide will walk you through generating your own SSH key pair, which consists of a public key and a private key, and how to use it on your Bare Metal.

Step 1: Generating the SSH Key Pair

On Windows

  1. Using PuTTYgen:
    • Download and install PuTTY, which includes PuTTYgen, from the official site.
    • Open PuTTYgen.
    • Click on “Generate” and follow the instructions to create a new key. Usually, this involves moving your mouse around the blank area to generate randomness.
    • Once the key is generated, you will see the public key displayed in the window.
    • Save the private key to your computer by clicking “Save private key”. It’s advisable to use a passphrase for added security.

On macOS and Linux

  1. Using Terminal:
    • Open Terminal.
    • Run the command: ssh-keygen -t rsa -b 4096. This creates a new RSA key pair with a 4096-bit length, offering strong security.
    • Follow the prompts to choose where to save the key and enter a passphrase for added security.

Step 2: Locating Your SSH Key

  • After generation, your public key will be located in the specified directory (default is usually ~/.ssh/). The public key file is typically named id_rsa.pub.

Step 3: Sharing the SSH Key

  1. Copying Your Public SSH Key: Use a text editor to open your public key file (.pub extension). Copy the entire contents of the file. The text will typically start with ssh-rsa.

  2. Sharing Your Public Key with Us: When setting up your Baremetal machine, our team will contact you to obtain your public key. This key is essential to enable your access to the machine once it is configured and handed over to you.

Step 4: Connecting to the Baremetal

On Windows

  1. Using PuTTY:
    • Open PuTTY.
    • Enter the server's IP address and specify the port (usually port 22 for SSH).
    • Go to “Connection” > “SSH” > “Auth” in the PuTTY configuration and load your private key file.
    • Click “Open” to initiate the connection.
    • If prompted, enter the username for your server and the passphrase for your private key.

On macOS and Linux

  1. Using Terminal:
    • Open Terminal.
    • Use the command ssh username@server -i /path/to/private/key, replacing username, server_ip_address, and /path/to/private/key with your server's username, its IP address, and the path to your private SSH key, respectively.
    • If it's your first time connecting, you'll be asked to confirm the server's authenticity. Type yes to continue.
    • Enter your passphrase if you set one.

Conclusion

You now have your own SSH key pair and know how to use it to securely connect to a Bare Metal server on Ori. Remember to keep your private key secure and never share it. Your public key is what you provide to services like Bare Metals for secure access to your Server.