Home PageArchiveContact UsAbout Us
If you are hopelessly addicted to drupal;
if bringing yourself to bed is allways a strugle;
if your main source of entertainement
is watching lullabot videos; then you belog

Setting Up Putty with SSL

See video
New Page 1 This is what you need to do to configure Putty to work with SSL authentication. Now that you have Putty installed, you should run another Putty application that comes with the Putty package. I am talking about PUTTYgen (Putty Key Generator). With this application open you will need to click on the "Generate" button to begin the process of generation the Private & Public SSL Keys. While the progress bar is still going you should move your mouse in a random fashion on the window's empty space in order to help PUTTYgen come up with a truly random number. Now, that the Keys have been generated, it is time to write a key comment. This can be a very helpful comment that will appear next to your public key. I suggest you to type something like your user name followed by a reference to your current computer. Now you click on the "Save private key" button. You will be, then. prompted regarding a missing password for your private key. The risk here is if some hacker invades your computer and is able to get a hold of your unprotected private key. In this case there is no easy answer. If you type a very complex password for your private key, you will have to remember it and take the time to type it every time. If you type an easy password, the hacker can easily use brute force and easily crack your password protected file. You might as well leave it without a password and make sure that your PC is secured. So I decided to leave my Private Key without a password. We just click on the "Yes" button and continue. Now we need to choose a place for our Keys. I suggest that you should save your Keys on the C drive, in the Users folder, and inside your own user folder. Inside your own user folder you should create a new folder called "Key Files". You should name the file as "id_rsa.ppk". Now you open Putty and load your Website's profile. This profile will still prompt you for a password. Hopefully, this will be the last time that you will have to type a password for this website when connecting to it via SSH. You will need to create a directory on the home folder of your website's account. This folder should be called ".ssh". You will have to enter into this newly created directory and create a new file with VI.
[root@drupalfever ~] mkdir .ssh [root@drupalfever ~] cd .ssh [root@drupalfever .ssh] vi authorized_keys
Now you will need to go back to "Putty Key Generator" and copy your newly created Public key. Then, you will have to go back to your Putty terminal and paste this Public Key into the "authorized_keys" file. 1) Type "i" to enter into insert mode in VI 2) You could only right-click on the Putty window and the Public Key would show up in the terminal window. Alternatively, you could use the key combination "Ctrl + Shift + V" to paste the Public Key. 3) Now, to save and quit Putty you will need to type the following: Esc : w q Enter Now you need to go up to the parent folder...
[root@drupalfever .ssh] cd .. [root@drupalfever ~]
Now you will need to do something that is very important and offend missed. You will have to change the permission on the file "authorized_keys" & on the ".ssh" folder.
[root@drupalfever ~] chmod -R 600 .ssh
After that you can exit the terminal:
[root@drupalfever ~] exit
Now we do the last step in this process. We will create a shortcut to the Private Key that we stored in our hard drive and place this shortcut inside the Start Up folder. After that, every time you restart your computer, "Pageant" will open up and load your Public Key. Now, the next time you open Putty and run your profile, Putty will automatically request your Public Key from Pageant and supply it to your web server which, in turn, will authenticate you and log you in without prompting for a password. That's it.
No votes yet