0% found this document useful (0 votes)
56 views

Generating An SSH Key Pair Using Putty Key Generator - Windows

The document provides instructions for generating an SSH key pair using PuTTY Key Generator on Windows. It describes opening PuTTY Key Generator, selecting key parameters like type and size, generating and saving the private key, copying the public key, and saving it as a separate file.

Uploaded by

t.ramamohan8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Generating An SSH Key Pair Using Putty Key Generator - Windows

The document provides instructions for generating an SSH key pair using PuTTY Key Generator on Windows. It describes opening PuTTY Key Generator, selecting key parameters like type and size, generating and saving the private key, copying the public key, and saving it as a separate file.

Uploaded by

t.ramamohan8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Generating an SSH Key Pair Using PuTTY Key Generator - windows

http://puttygen.software.informer.com/download/

When you define your Oracle DBaaS database instance, you will need to provide a secure
shell (SSH) public key to establish secure connections. Perform the following steps to
generate an SSH key pair using the PuTTY Key Generator on Windows.

1. Find puttygen.exe in the PuTTY folder on your computer, for example,


C:\Program Files (x86)\PuTTY. Double-click puttygen.exe to open it.

Accept the default key type, SSH-2 RSA.


SSH-2 is the most recent version of the SSH protocol (and is incompatible with SSH-1). RSA
and DSA are algorithms for computing digital signatures.

Set the Number of bits in a generated key to 2048 bits, if it is not already set with that value.

This sets the size of your key and thus the security level. A minimum of 2048 bits is recommended
for SSH-2 RSA.

• Click Generate.

Move your mouse around the blank area to generate randomness to the key.

Note: the dotted red line in the image below is for illustration purposes only. It does not
appear in the generator pane as you move the mouse.
The generated key appears under Public key for pasting into OpenSSH authorized_keys file.

The key comment is the name of the key that you will use to identify it. You can keep the generated
key comment or create your own.

• If you want to password-protect your key, enter a Key passphrase and enter it again for
Confirm passphrase. When you reload a saved private key, you will be asked for the
passphrase, if one is set.
While a passphrase is not required, you should specify one as a security measure to protect
the private key from unauthorized use.

There is no way to recover a passphrase if you forget it.

Save the private key of the key pair. Depending on how you work with the private key in the
future, you may need one saved in the PuTTY PPK format and one saved in OpenSSH
format. Let's save the private key in both formats.

a. To save the key in the PuTTY PPK format, click Save private key to save the private
key of the key pair.

You can use this key whenever you use Putty to perform SSH actions.

To save the key in OpenSSH format, open the Conversions menu and select Export SSH key. This will
be the same key as above, just saved in a different format.

You can name it anything you want, but to keep track of your keys, you should give it the same name
as the key you saved in PPK format in the previous step. You can also use any extension (or no
extension), but let's use .ssh, to make it clear what format it is.

You can use this key whenever you use OpenSSH to perform SSH actions using ssh utitlities that
support OpenSSH, for example when using Linux in a command shell.

Now you need to create the public key to be paired with the private key(s) you just created.
However, clicking the Save public key button will create a public key that won't work with Oracle
Cloud services in certain cases. So, for the purposes of this tutorial, there is no reason to save a
public key using the Save public key button.
Instead, proceed as follows

In the PuTTY Key Generator, select all of the characters under Public key for pasting into
OpenSSH authorized_keys file.

Make sure you select all of the characters, not just the ones you can see in the narrow
window. If a scroll bar is next to the characters, you aren't seeing all the characters, and you
will need to scroll to select all of the characters.

Right click somewhere in the selected text and select Copy from the menu.

Open a text editor and paste the characters, just as you copied them. Start at the first character in
the text editor, and do not insert any line breaks.

Save the key as a text file, using the same root name as you used for the private key. Add a .pub
extension. You can give it any extension you want, but .pub is a useful convention to indicate that
this is a public key.

Write down the names of your public and private keys, and note where they are saved. You will need
the public key when you create a service instance in the next section. You would also need the
private key when trying to access a service instance's virtual machine via SSH.

GENERATE SSH KEYS ON MAC


If you are on Mac and using Terminal (and not Putty) then follow

https://www.siteground.com/kb/how_to_generate_an_ssh_key_pair_in_mac_os/

Generating an SSH Key Pair on UNIX and UNIX-Like Platforms Using the ssh-keygen
Utility

UNIX and UNIX-like platforms (including Solaris and Linux) include the ssh-keygen
utility to generate SSH key pairs.

To generate an SSH key pair on UNIX and UNIX-like platforms using the ssh-keygen
utility:

1. Navigate to your home directory:


$ cd $HOME

2. Run the ssh-keygen utility, providing as filename your choice of file name for the
private key:

$ ssh-keygen -b 2048 -t rsa -f filename

The ssh-keygen utility prompts you for a passphrase for the private key.

3. Enter a passphrase for the private key, or press Enter to create a private key
without a passphrase:
Enter passphrase (empty for no passphrase): passphrase

The ssh-keygen utility prompts you to enter the passphrase again.


4. Enter the passphrase again, or press Enter again to continue creating a private
key without a passphrase:
Enter the same passphrase again: passphrase
5. The ssh-keygen utility displays a message indicating that the private key has been
saved as filename and the public key has been saved as filename.pub. It also
displays information about the key fingerprint and randomart image
Import the key using puttygen
And save Private key

You might also like