Jan 06, 2016 Generating a SSH key and use the result to log in to your Azure Linux VM is not that hard to accomplish. In the following article I want to go over the steps. Get PuTTYgen to generate your SSH key First we need to download another “PuTTY” tool called PuTTY Key Generator. Just download the PuTTYgen executable and start. PuTTYgen is an key generator tool for creating SSH keys for PuTTY. It is analogous to the ssh-keygen tool used in some other SSH implementations. The basic function is to create public and private key pairs. PuTTY stores keys in its own format in.ppk files. However, the tool can also convert keys to and from other formats. May 04, 2015 Verified and Tested 2/8/15 Introduction. This guide will show you how to generate and use SSH keys (public and private) using PuTTYgen and PuTTY for Linux servers. How to Generate and Use an SSH Key. How to Generate SSH Keys on PuTTY. SSH keys are one of the most secure SSH authentication options. It is definitely more secure than the usual SSH password authentication. Therefore, it is highly recommended to use SSH Key authentication method for connections to your servers.
- Accessing Linux Qwiklabs With Putty Key Generator Download
- Accessing Linux Qwiklabs With Putty Key Generator For Windows
- Accessing Linux Qwiklabs With Putty Key Generator Key
- Accessing Linux Qwiklabs With Putty Key Generator For Mac
- Accessing Linux Qwiklabs With Putty Key Generator Reviews
- Accessing Linux Qwiklabs With Putty Key Generator Free
PuTTYgen is a key generator tool for creating pairs of public and private SSH keys. It is one of the components of the open-source networking client PuTTY. Although originally written for Microsoft Windows operating system, it is now officially available for multiple operating systems including macOS, Linux. PuTTYgen.exe is the graphical tool on Windows OS. While on the other side, Linux OS has the only command-line version could be accessible using SSH commands.
- 1 Download PuTTYgen
- 1.1 Download PuTTYgen on Windows
- 1.2 Download PuTTYgen for Mac
- 1.3 Download PuTTYgen for Ubuntu/Linux
- 1.3.3 Types of Keys Supported on PuTTYgen
Puttygen aka Putty Key Generator
The key generation utility – PuTTYgen can create various public-key cryptosystems including Rivest–Shamir–Adleman (RSA), Digital Signature Algorithm (DSA), Elliptic Curve Digital Signature Algorithm (ECDSA), and Edwards-curve Digital Signature Algorithm (EdDSA) keys.
The aforementioned public-key cryptosystems principally focus on secure data transmission and digital signatures.
Although PuTTYgen collects keys in its native file format i.e. .ppk files, the keys can easily be converted to any file format. For Windows, the software interface is PuTTYgen.exe, whereas, for Linux OS the command-line adaptation is available using SSH commands.
How to use PuTTYgen?
PuTTYgen is used to generate public or private key pair for creating SSH keys. Below is the complete guidance about how to generate RSA key in the Windows operating system:
- Once you install the PuTTY on your machine, you can easily run PuTTYgen. For the same, go to Windows -> Start Menu -> All Programs -> PuTTY -> PuTTYgen.
- You will see the PuTTY key generator dialog box on your screen
- You will find a “Generate” button in that dialog. Clicking on it will lead to generating the keys for you.
- Now you will need to add a unique key passphrase in the Key passphrase and Confirm passphrase field.
- Click on the “Save Public Key” and “Save Private Key” buttons to save your public and private keys.
- You will see the text starting with ssh-RSA in the Public key for pasting into OpenSSH authorized_keys file field which is located at the top of the window. Copy that entire text to your clipboard by pressing ctrl+c as you will require the key to paste on your clipboard in the public key tool of control panel or directly on the cloud server.
Various Ways to Use RSA Key Pair
RSA key pair generated through PuTTYgen is used in two various ways defined as below:
- To assign while creating a new cloud server
You can choose the public key from the given list of keys at the time of creating a cloud server. If you don’t find your key in that list, then first add and then assign it. - Assign to an existing cloud server
At the time of connecting to the cloud server, first of all, you need to tell PuTTY to use it for utilizing your newly created RSA key pair.
PuTTYgen being a component of the terminal emulator PuTTY does not have to be downloaded separately, hence, comes with the PuTTY .msi installation package. You can follow the simple steps to download PuTTYgen software for your system. That is the reason why you don’t need to download PuTTYgen separately. Once you download PuTTY software, you will be able to install and run PuTTYgen easily in no time. Below is the complete instruction about how to download and install PuTTY on Windows.
Apart from that, it is also integrated into third-party programs such as WinSCP installation package. Below you can find a complete PuTTYgen download and installation guide for all operating systems.
Download PuTTYgen on Windows
To download PuTTYgen the primary requisite is to acquire the copy of PuTTY installation package. For the 64-bit operating system, one must install the 64-bit version of PuTTY, i.e. putty-64bit-<version>-installer.msi.Similarly, for the 32-bit operating system, the respective 32-bit version of PuTTY, i.e. putty-<version>-installer.msi needs to be installed.
To get PuTTY, go to PuTTY Installation Download page, whereby the complete installation package will be available with setup instructions, installation guide, and download links to all other components of PuTTY such as putty.exe, pscp.exe, psftp.exe, puttytel.exe, plink.exe, pageant.exe and putty.zip.
Accessing Linux Qwiklabs With Putty Key Generator Download
Following the successful download of the PuTTY installation package. It is time to install the program. Go to How to install PuTTY on Windows, whereby you will find the step by step guidance for PuTTY installation for Windows operating system.
After successfully downloading and installing PuTTY on your Windows machine, you are just 2-3 clicks away to run PuTTYgen. Follow the below-given step by step guidance to run PuTTYgen:
Run PuTTYgen on Windows
To run PuTTYgen, Go to Windows -> Start Menu -> All Programs -> PuTTY -> PuTTYgen. You will see a window for the PuTTY Key Generator on your screen.
Voila! Now you can generate public or private key pair using PuTTYgen.
Download PuTTYgen for Mac
Below is the detailed guide to download PuTTYgen on Mac operating system. Mac OS has a built-in command-line SSH client known as Terminal. To utilize it, go to Finder and then opt for Go -> utilities from the top menu. After that find the terminal which supports SSH connections to remote servers.
However, to run PuTTYgen for mac, the first one must have to install PuTTY. There are multiple ways to install PuTTY, which are Homebrew or MacPorts. Both alternatives will also install the command-line of adaptations of PuTTYgen.
Ported PuTTY for Mac
Mac has the port of PuTTY which can be installed in various ways described as below:
- Installation using Homebrew:
First, install the ‘brew command line’ Once installed use the below-given command to install PuTTY:-sudo brew install putty
- Installation using MacPorts:
First of all, one must install MacPorts and then use the command-line to install PuTTY. Here is the command to install PuTTY via MacPortssudo port install putty
Additionally, a user can also add a shortcut to the desktop by writing the following command line–cp /opt/local/bin/putty ~/Desktop/PuTTY
However, there is an alternative way to install PuTTY on Mac OS. Cyberduck is a widely used Mac OS SSH Client. Once PuTTY installed on the Mac OS, a user can convert PuTTY derived private key format to OpenSSH.
To convert the private key to standard PEM format, type the following command –
puttygen privatekey.ppk -O private-openssh -o privatekey.pem
You can also read the guide to convert .pem file to .ppk using puttygen.
Download PuTTYgen for Ubuntu/Linux
To download PuTTYgen for Ubuntu (Linux) operating system, a user to first install PuTTY. However, in some Linux distributions, the SSH key generation tool – PuTTYgen needs to be installed independently from the PuTTY client.
For example, Debian Linux requires the below-given code to install PuTTYgen:
sudo apt install putty-tools
Generate Key Pair for Authentication in Linux
To create the key pair for authentication in Linux use the below command:-
puttygen -t rsa -b 2048 -C 'user@host' -o keyfile.ppk
Various Command Line Options of PuTTY in Linux
Below are few important command line options in the Linux operating system for PuTTY:
PuTTYgen [-t keytype [-b bits] [-q] | keyfile]
[-C new-comment] [-P]
[-O output-type | -p | -l | -L]
[-o output-file]
[-C new-comment] [-P]
[-O output-type | -p | -l | -L]
[-o output-file]
Options:
- Keyfile – It is the name of the existing key file to read at the time of changing the current key.
- –t keytype – The command specifies the type of key to creating. Its acceptable values are RSA and dsa.rsa1.
- -b bits – This command specifies a total number of bit in a particular key. 1024 is the perfect size for DSA key, while 2048 or 4096 are the perfect size for RSA keys.
- –q – The command suppresses the message about progress at the time of key generation.
- -C new-comment – The command will specify the comment to describe the key. It can be used for the new and/or existing key. Key operation is not affected by a comment. However, it is used to recognize the key owner, it’s not reliable completely as any value can be applied to it.
- –P – Using the command will update the passphrase of a key. Passphrase helps to encrypt the private key. As passphrase can’t add or update on a command line, it prompts a new passphrase tool to alter it.
- –old-passphrase-file – The old password of the key remains in this file. The command is used when the key is protected by a passphrase.
- –new-passphrase file – This command prompts the new passphrase of the key. It comes in the action either at the time of generating a new key or while applying –P command to change the passphrase.
- -O output-type – This command defines what to give in output. By default, the private key is the output.
Thus, above are the prominent commands of PuTTYgen in Linux operating system. Besides that, there are many other commands available to perform various tasks from the command prompt in Linux at flank speed.
Types of Keys Supported on PuTTYgen
It is important to know the types of key PuTTYgen supports prior to using it. Below are the key types that it currently supports for SSH-2 and SSH-1 protocol:-
- SSH-1 protocol:- For SSH-1 only supports one key i.e. Rivest–Shamir–Adleman (RSA)
- SSH-2 protocol: – SSH-2 supports multiple key types that include – Digital Signature Algorithm (DSA), Elliptic Curve Digital Signature Algorithm (ECDSA) and Ed25519.
The above description is a detailed brief on downloading and running PuTTYgen on all major operating systems. For further details please check the Download PuTTY page.
You can access the service instance's VMs by logging into the VM as the
opc
user through SSH. You can use any SSH utility you want. For example, if you are using Windows, you might use PuTTY; if you are using Linux, you might use OpenSSH. Note:
Only the
opc
user can remotely connect to your VMs. You can not use SSH to connect to a VM as the oracle
user. After successfully connecting to a VM, tasks such as starting and stopping the server and accessing the administrative logs should only be performed by the oracle
user. Topics
Understanding SSH Keys
To access an Oracle API Platform Cloud Service- Classic virtual machine (VM) with a secure shell (SSH) client, you must create a public/private key pair and configure the service instance with the public key.
When you create an Oracle API Platform Cloud Service- Classic instance, you are prompted to supply the public key. You can either provide an existing public key that you previously created with an external tool, or Oracle API Platform Cloud Service- Classic can create a new key pair for you. To connect to a VM in an Oracle API Platform Cloud Service- Classic instance, you supply the paired private key when logging in to the machine using an SSH client.
You may also use the same SSH public/private key pair that you used for creating an Oracle Database Cloud Service database deployment.
See also:
- The Creating SSH Keys for Use with Oracle Cloud Services tutorial
Generating a Secure Shell (SSH) Public/Private Key Pair
Several tools exist to generate SSH public/private key pairs. The following sections show how to generate an SSH key pair on UNIX, UNIX-like and Windows platforms.
Topics
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:
- Navigate to your home directory:
- Run the ssh-keygen utility, providing as
filename
your choice of file name for the private key:The ssh-keygen utility prompts you for a passphrase for the private key. - Enter a passphrase for the private key, or press Enter to create a private key without a passphrase:Note:While a passphrase is not required, you should specify 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.The ssh-keygen utility prompts you to enter the passphrase again.
- Enter the passphrase again, or press Enter again to continue creating a private key without a passphrase:
- The ssh-keygen utility displays a message indicating that the private key has been saved as
filename
and the public key has been saved asfilename.pub
. It also displays information about the key fingerprint and randomart image.
Generating an SSH Key Pair on Windows Using the PuTTYgen Program
The PuTTYgen program is part of PuTTY, an open source networking client for the Windows platform.
To generate an SSH key pair on Windows using the PuTTYgen program:
- Download and install PuTTY or PuTTYgen.To download PuTTY or PuTTYgen, go to http://www.putty.org/ and click the You can download PuTTY here link.
- Run the PuTTYgen program.
- Set the Type of key to generate option to SSH-2 RSA.
- In the Number of bits in a generated key box, enter 2048.
- Click Generate to generate a public/private key pair.As the key is being generated, move the mouse around the blank area as directed.
- (Optional) Enter a passphrase for the private key in the Key passphrase box and reenter it in the Confirm passphrase box.Note:While a passphrase is not required, you should specify 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.
- Click Save private key to save the private key to a file. To adhere to file-naming conventions, you should give the private key file an extension of
.ppk
(PuTTY private key).Note: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. Refer to the PuTTY documentation to convert a private key in this format to a different format. - Select all of the characters in the Public key for pasting into OpenSSH authorized_keys file box.Make sure you select all 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.
- 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 text file in the same folder where you saved the private key, using the
.pub
extension to indicate that the file contains a public key. - If you or others are going to use an SSH client that requires the OpenSSH format for private keys (such as the
ssh
utility on Linux), export the private key:- On the Conversions menu, choose Export OpenSSH key .
- Save the private key in OpenSSH format in the same folder where you saved the private key in
.ppk
format, using an extension such as.openssh
to indicate the file's content.
Connecting to an Administration Server or Load Balancer VM
You can access an Administration Server or a Load Balancer VM through a secure shell (SSH) utility.
- Navigate to the Services page of the My Services Console.
- Click the service instance associated with the VM you want to access.The Oracle API Platform Cloud Service- Classic Overview page appears, displaying detailed information about the service instance.
- From the list of virtual machines, note the Public IP address of the Administration Server, the Managed Servers, or the Load Balancer, depending on which VM you want to access.This address will be specified in the typical octet format (111.111.111.111).
- On UNIX and UNIX-like platforms, use the standard OpenSSH command (
ssh
) to connect to the VM as theopc
user.Provide the following:- The path to the private key corresponding to the public key used at the time of provisioning.
- The VM’s public IP address.
in this format: - On Windows, you can use PuTTY, an open source networking client for the Windows platform, to connect to the VM as the
opc
user.To download PuTTY, go to http://www.putty.org/ and click the You can download PuTTY here link.- Launch PuTTY.The PuTTY Configuration window is displayed, showing the Session panel.
- In the Host Name (or IP address) field, enter the public IP address of the VM.
- In the Category tree, expand Connection if necessary and then click Data.
- In the Auto-login username field, enter
opc
. - Confirm that the When username is not specified option is set to Prompt.
- In the Category tree, expand Connection > SSH, and then click Auth.
- Under Private key file for authentication, click Browse.
- Navigate to and select your private key file. Then click Open.Note: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. If you have to use a key saved in a different format, see the PuTTY documentation. - Click Open to open the connection to the VM.
- Launch PuTTY.
- If the private key was defined with a passphrase, enter this value when prompted.
When the VM command line appears, you can use any resource accessible from the VM. For example, you can run the WebLogic Scripting Tool on the Administration Server VM.
Connecting to a Managed Server VM
You can access a Managed Server VM through a secure shell (SSH) utility by using the Administration Server VM as a proxy.
Alternatively, you can connect to the Administration Server VM with SSH, and from within this SSH session start another SSH connection to the Managed Server VM.
To connect to a Managed Server VM by using the proxy method:
- Navigate to the My Services Console.
- Click the service instance associated with the VM you want to access.The Oracle API Platform Cloud Service- Classic Overview page appears, displaying detailed information about the service instance.
- From the list of virtual machines, identify the following information:
- The Public IP address of the Administration Server VM (used as the proxy).
- The Host name of the Managed Server VM to which you want to connect.
- On UNIX and UNIX-like platforms, use the standard OpenSSH command (
ssh
) to connect to the VM as theopc
user.Provide the following:- The path to the private key corresponding to the public key used at the time of provisioning.
- The Administration Server VM’s public IP address.
- The Managed Server VM’s host name.
in this format: - On Windows, you can use PuTTY, an open source networking client for the Windows platform, to connect to the VM as the
opc
user.To download PuTTY, go to http://www.putty.org/ and click the You can download PuTTY here link.- Launch PuTTY. If your private key was defined with a passphrase, then you must use the
pageant
utility to launch PuTTY:For example: - If you used
pageant
to start PuTTY, enter the passphrase for the private key.The PuTTY Configuration window is displayed, showing the Session panel. - In the Host Name (or IP address) field, enter the host name of the Managed Server VM.
- In the Category tree, expand Connection if necessary and then click Data.
- In the Auto-login username field, enter
opc
. - Confirm that the When username is not specified option is set to Prompt.
- In the Category tree, click Connection > Proxy.
- Set Proxy type to Local.
- In the Proxy hostname field, enter the IP address of the Administration Server VM.
- Set the Port to 22.
- In the Telnet command or local proxy command field, enter the following value:For example:
- In the Category tree, expand Connection > SSH, and then click Auth.
- Under Private key file for authentication, click Browse.
- Navigate to and select your private key file. Then click Open.Note: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. If you have to use a key saved in a different format, see the PuTTY documentation. - Click Open to open the connection to the VM.Note: Window xp home edition product key generator.You can optionally save this session configuration by navigating to the Session panel and clicking Save. When you open PuTTY the next time, you can load this configuration by selecting it and clicking Load.
- Launch PuTTY. If your private key was defined with a passphrase, then you must use the
When the VM command line appears, you can use any resource accessible from the VM.
Creating an SSH Tunnel
An SSH tunnel to an Oracle API Platform Cloud Service- Classic VM enables you to connect to other non-public ports on the VM though a port your local machine.
Accessing Linux Qwiklabs With Putty Key Generator For Windows
If a resource provided by a VM uses a port that is not directly accessible through the Internet, you can access that resource by creating an SSH tunnel to the port.
Accessing Linux Qwiklabs With Putty Key Generator Key
In general an SSH tunnel may map a remote port to any available port number on your local machine. However, port 9001 on the Administration Server uses JMX/RMI for communication, which requires that the remote and local port numbers be the same value. Therefore, the following instructions configure the tunnel’s local port number to the same value as the VM’s port number.
To set up an SSH tunnel to a VM:
- Navigate to the Services page of the My Services Console.
- Click the service instance associated with the VM you want to access.The Oracle API Platform Cloud Service- Classic Overview page appears, displaying detailed information about the service instance.
- From the list of virtual machines, note the Public IP address of the Administration Server, the Managed Servers, or the Load Balancer, depending on which VM you want to access.This address will be specified in the typical octet format (111.111.111.111).
- On UNIX and UNIX-like platforms, use the standard OpenSSH command (
ssh
) to create an SSH tunnel to the VM.Provide the following:- The path to the private key corresponding to the public key used at the time of provisioning.
- The VM’s public IP address.
- The port number on the VM to which you want to connect. The SSH tunnel will enable connectivity to this remote port though the same port number on your local machine.
in this format:For example, to create an SSH tunnel to port 9001 on the Administration Server VM: - On Windows, you can use PuTTY, an open source networking client for the Windows platform, to create an SSH tunnel to the VM.To download PuTTY, go to http://www.putty.org/ and click the You can download PuTTY here link.
- Launch PuTTY.The PuTTY Configuration window is displayed, showing the Session panel.
- In the Host Name (or IP address) field, enter the public IP address of the VM.
- In the Category tree, expand Connection if necessary and then click Data.
- In the Auto-login username field, enter
opc
. - Confirm that the When username is not specified option is set to Prompt.
- In the Category tree, click Connection > SSH.
- Under Protocol options, select the checkbox Don't start a shell command at all.
- In the Category tree, expand Connection > SSH, and then click Auth.
- Under Private key file for authentication, click Browse.
- Navigate to and select your private key file. Then click Open.Note: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. If you have to use a key saved in a different format, see the PuTTY documentation. - In the Category tree, click Connection > SSH > Tunnels.
- In the Destination field, enter
IP:port
,where IP is the IP address of the VM and port is the port number on the VM to which you want to connect. - In the Source Port field, enter the same port number.
- Click the Add button.
- Click Open to create the SSH tunnel to the VM.Note:You can optionally save this session configuration by navigating to the Session panel and clicking Save. When you open PuTTY the next time, you can load this configuration by selecting it and clicking Load.
- Launch PuTTY.
- If the private key was defined with a passphrase, enter this value when prompted.
Applications running on your local machine can now communicate with the VM by using
localhost:port
, where port is the local port number. For example, after creating an SSH tunnel to port 9001 on the Administration Server VM, launch a web browser and connect to
http://localhost:9001/console
. Note:
After your work with the SSH tunnel is complete, perform a <ctrl> C
to shut down the SSH tunnel. Switching VM Users
You can change users on an Oracle API Platform Cloud Service- Classic VM in order to perform specific administration tasks.
You must SSH to a VM only as the
opc
user. This user has root privileges on the OS running in the VM. For example, opc
can be used to create other OS users on a VM. Simply prefix root operations with the sudo
command. For example: Accessing Linux Qwiklabs With Putty Key Generator For Mac
Note:
There is no default password for the Accessing Linux Qwiklabs With Putty Key Generator Reviews
opc
user. Switching to Oracle
The
oracle
VM user has regular OS user permissions. It is intended to be used to start and stop Oracle products that have been installed on the VM, or to run other Oracle applications and utilities on the VM. Type the following to become the
oracle
user: Note:
There is no default password for the oracle
user. Switching to Root
An alternative to using the
sudo
command to perform root OS operations with the opc
user is to switch to the root
user. Type the following to become the
root
user: Note:
Avoid using the Accessing Linux Qwiklabs With Putty Key Generator Free
root
user except to perform privileged OS administration tasks.