SSH access from Windows
Password based authentication is very insecure and vulnerable to bot-nets trying to guess user-names and passwords over the internet. Hence we recommend key based authentication to access the server. Please follow these steps to add your keys on the server:
1. Download installer files of three software named PuTTY, PuTTYgen and Pageant here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
2. Install PuTTY, PuTTYgen and Pageant on your computer
Setting up SSH key-based authentication:
3. We will first generate an SSH key pair.
(i) Launch PuTTYgen.
(ii) Select the “SSH2 RSA” or “SSH2 DSA” key type and set the number of bits in the generated key to 2048 in the “Parameters” group at the bottom of the dialog box.
(iii) Click on “Generate” and move your mouse over the blank area of the window to generate entropy.
4. We will now save the keys generated on your local machine:
(i) Type a passphrase into the “Key passphrase” and “Confirm passphrase” edit boxes.
(ii) Enter your name in the “Key Comment” edit box.
(iii) Click on “Save private key” and “Save public key” to save your SSH private and public keys at your desired location.
(iv) If you change any of Key passphrase or Key Comment in future, the SSH private and public keys will change and you would have to save the new keys and go thorough the steps here onwards again.
5. Now we will add the keys on the server: (i) If you want to us to add your keys on the server, send us your public key generated above at firstname.lastname@example.org(ii) If you want to add the keys yourself, add the content of the public to /home/$USER/.ssh/authorized_keys file on your server where $USER = user you are logging in as. “.ssh” directory should have 700 permissions and authorized_keys file should have 400 or 600 permissions:
$ chmod 700 .ssh/
$ chmod 600 .ssh/authorized_keys
6. Run pageant (putty ssh agent) and do following steps:
(i) Click on “Add key” and select your private key generated earlier using PuTTYgen. It will ask you for the passphrase and remembers it for this session.
(ii) Let pageant run in the background.
7. Launch PuTTY which will open PuTTY configuration window and set the following:
- Select “Session” from “Category” pane on left. Set Host Name as and Connection Type as SSH.
- Go to “Connection -> Data” and set “Auto-login username” as “root” or whichever user you are logging in as.
- If you are not using Pageant, Go to “Connection -> SSH -> Auth” and click on “Browse” to select the private key generated earlier.
- Go back to Session and click on Save after creating a session name in “Saved Session”.
6. Select the session you saved and click on Load. Then click on “Open” to launch the terminal window.