Generate a Key Pair with PuTTY

You can generate a secure shell (SSH) key pair for an Oracle Java Cloud Service instance on a Windows platform by using the PuTTY Key Generator utility.

PuTTYgen is included with your PuTTY installation. To download PuTTY, go to

  1. Start PuTTYgen on your Windows computer.
    The PuTTY Key Generator window is displayed.
  2. For Type of key to generate, select SSH-2 RSA.
  3. For Number of bits in a generated key, enter 2048.
  4. Click Generate.
  5. When prompted, move the mouse around the specified section of the window.
  6. Optional: Enter a passphrase for the private key in Key passphrase and Confirm passphrase.


    While a passphrase is not required, Oracle recommends using one as a security measure to protect the private key from unauthorized use. When you specify a passphrase, a user must enter the passphrase every time the private key is used.

  7. Click Save private key.
    The .ppk file extension indicates that the private key is in PuTTY's proprietary format. You must use a key of this format when using PuTTY as your SSH client. It cannot be used with other SSH client tools.
  8. Select the entire contents of Public key for pasting into OpenSSH authorized_keys file.
    This window may have a scroll bar. Be sure to select all of the characters.
  9. Right-click the selected text, and then select Copy.
  10. Open a text editor.
  11. Paste the copied text into the editor. Do not insert any line breaks.
  12. Save the public key file to the same location as the private key file.
  13. Optional: Create a copy of the private key in the OpenSSH format.
    1. From the PuTTY Key Generator window, click Conversions, and then select Export OpenSSH key.
    2. Save the converted private key file to the same location as the .ppk file. Use a different file extension such as .openssh.