Skip to main content

Managing SSH Keys

SSH keys are the way to access your compute resources. OGC offers an SSH key management service that enables your to add and reuse keys across multiple machines.

Step 1: Generating the SSH Key Pair

You will first need to generate the SSH key pair (public / private key). The private key will be stored on the customer side while the public key will be used in OGC.

  1. Open Terminal.
  2. Run the command: ssh-keygen -t rsa -b 4096. This creates a new RSA key pair with a 4096-bit length, offering strong security.
  3. 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: Using SSH Key

With the public key contents(single line of text starting with ssh-rsa), you are now able to provision your compute resource.

Step 4: Connecting to the machine

  1. Open Terminal.
  2. Use the command ssh username@ip_address -i /path/to/private/key.
  3. If it's your first time connecting, you'll be asked to confirm the server's authenticity. Type yes to continue.
  4. Enter your passphrase if you set one.