Sunday, September 1, 2013

How to Install PuTTY & How to Use..SSH client for Windows.


How to Install PuTTY & How to Use..SSH client for Windows.
PuTTY is a popular free SSH client for Windows. 
How to Install PuTTy.......

Download the PuTTY Installer

Make sure you grab the latest stable release under the headers Binaries/A Windows installer for everything except PuTTYtel and will be named similar to putty-0.62-installer.exe.

Running the Installer

After you have installer downloaded open up the folder you downloaded it to in the File Explorer and double click on the icon to run the installer.
Step 1: You will be greeted by the Welcome dialog. You may click the Next > button to continue
Wizard Step 1: Welcome
Step 2: The wizard will ask you to select a directory to install PuTTY to. You should use the default and click the Next > button to continue.
Wizard Step 2: Select install directory
Step 3: The wizard will ask which folder you wish to put PuTTY into on the Start Menu. You should use the default and click the Next > button to continue.
Wizard Step 3: Start Menu location
Step 4: You will be asked addtional questions. You can choose to have an icon placed on your desktop or on the Panel as a quick start button for easier access to PuTTY if you wish. It is recommended that you keep the option for associating .ppk files checked. You may click the Next > button to continue.
Wizard Step 4: Additional options
Step 5: PuTTY is now ready to install. You may click the Install button to start the installation process.
Wizard Step 5: Install
Step 6: You are now down and may click the Finish button to exit the installer. It is recommended that you read the README file for further information about PuTTY.
Wizard Step 6: Finish

Importing Your SSH Key

It is assumed that you have already gone through the steps to create an SSH key to be used with OpenShift. You may now import that key for use with PuTTY.
Step 1: Launch PuTTYgen
You need to launch PuTTYgen, the PuTTY key manager. From the Start Menu type in putty in the search box. A list of putty applications will show up. Click on PuTTYgen. On older versions of Windows navigate to the PuTTY folder and launch it from there.
Import SSH Key Step 1: Launch PuTTYGen
Step 2: Import the SSH Key
Once PuTTYgen is started go to the Conversions menu and select the Import key item.
Import SSH Key Step 2: Select Import key menu item
Step 3: Select the SSH Key for Import
A file dialog should pop up. Navigate to the .ssh directory in your user folder C:\Users\<user name>\.ssh and select the id_rsa key that was generated for you by rhc setup.
Import SSH Key Step 3: Select your private key
Step 4: Save the Private Key as a .PPK File
PuTTYgen will load your key and display it. In this dialog press the Save private key button.
Import SSH Key Step 4: Save your private key
Step 5: Select a Key Name
Another file dialog will pop up for you to select where to save the key. Again navigate to the .ssh directory in your user folder C:\Users\<user name>\.ssh. Name the key whatever you wish but make sure you do not overwrite any files in this directory. Good names to use are default.ppk or id_rsa.ppk.
Import SSH Key Step 5: Select a key name
You are now done with importing your SSH key and may close the PuTTYgen application.

Configuring a Session to Connect to Your Application

It is assumed that you have already created an application on OpenShift at this point and want to configure PuTTY so you can easily ssh to it.
Step 1: Launch PuTTY
If you selected the option to put an icon on the desktop or a button the start menu you may launch PuTTY from there. Otherwise, click on the start menu and in the search box type in putty. Select the PuTTY application to run. On older versions of windows you may need to navigate to the PuTTY directory in the Start Menu and launch it from there.
Configure a PuTTY Session Step 1: Launch PuTTY
Step 2: Get the SSH Address
You need to get the ssh address to enter into PuTTY. The easiest way to find the SSH address is to go to the applications list page in the web console and click on your application to go to the details page. Once on the details page you can click on the Want to log in to your application? link to expand the text. This text includes the ssh command and the address. In the next step you will want to copy this text but remove the ssh command from the front of the string.
Configure a PuTTY Session Step 2: Get the SSH address
Step 3: Enter the Address into PuTTY
In the Session category, under the Host Name form past the text you copied from the previous step, remembering to remove the ssh command from the begining of the string.
Configure a PuTTY Session Step 3: End the Address into PuTTY
Step 4: Associate Your SSH Key with the Session
In the Category tree, expand the Connection and then SSH categories and select Auth. Here click on the Browse button and when the file dialog pops up, again navigate to the.ssh directory in your user folder C:\Users\<user name>\.ssh and select the .ppk file you saved there.
Configure a PuTTY Session Step 4: Associate the ssh key
Step 5: Save Your Session
In the Category tree go back to the Session category. In the Saved Sessions form name your session. We recommend using the name of your application. Click the save button and you should see it pop up in the list.
Click the Open button to connect to your application.
Now whenever you wish to connect to your app you can simply select your session in the list. Click on the Load button and then click on the Open button.
Configure a PuTTY Session Step 5: Save your session
Go back to the SSH page for more information on the commands you can use inside of an SSH session.