Go to main content

Using Oracle® Compute Cloud Service - Dedicated Compute Capacity - SPARC Model 300

Exit Print View

Updated: April 2018
 
 

Generate an SSH Key Pair on Oracle Solaris

Complete these steps to generate an SSH key pair on UNIX and UNIX-like systems.

  1. Run the ssh-keygen command.

    You can use the -t option to specify the type of key to create. For example, to create an RSA key, type:

    # ssh-keygen -t rsa

    You can also use the -b option to specify the length (bit size) of the key. For example:

    # ssh-keygen -b 2048 -t rsa
  2. When prompted, enter the path to the file in which you want to save the key.

    The prompt displays a suggested default path and file name in parentheses. For example, the prompt might display /export/home/user_name/.ssh/id_rsa.

    • To accept the default path and file name and press Enter.
    • To supply your own values, type the preferred path and file name, and then press Enter.
  3. Provide a passphrase.

    A passphrase is not required, but you can use it to protect your private key against unauthorized use.

    • When prompted, type a passphrase.
    • When prompted, confirm the passphrase by typing it a second time.
  4. Make a note of the path and file names of the private and public keys.

    When you log in to an instance, you’ll need to provide the path to the corresponding SSH private key and the passphrase, when prompted.


    Caution

    Caution  -  Keep your SSH keys secure so they aren't lost or compromised. If you lose your private key, you can't access your instances.