Recent Changes - Search:
 Welcome to the Cisco Academy for Vision Impaired Linux Wiki.

PmWiki

edit SideBar

EnablingLoggingInViaAKeyPair

This article will show you how to login via a key pair using secure shell (ssh). This has the advantage of not requiring to use account passwords.

Prerequisits!!

1. A terminal emulater program. Putty is a good choice.

2. You will also need teraterm for key generation. Putty's key generater is inaccessible since the key generation requires you to move the mouse over an area on the screen.

3. A mechanism to transfer files to the Linux computer.

Generating keys and setting them up for login!!

1. Launch teraterm.

2. Navigate to the cancel button and activate it.

3. Hit alt+s and launch the ssh key generator and hit the "generate" button to generate the keys. It is advisable to password protect your private key. Failure to do this will result in anyone with access to your private key having access to anything it can authenticate with.

4. Sabe the public and private keys.

5. Login as the user for whom you want to enable login via keys.

6. transfer the public key to the user's home directory. If you already have other keys, then go to step 9.

7. Make a hidden directory called .ssh The command for this is: mkdir .ssh

8. Copy the public key file to: .ssh/authorized_keys

9. If you already have an authorized_keys file, append the public key to it. One way to do this is to use the cat command. Suppose your public key is in a file called pubkey.dat then execute the following command. cat pubkey.dat >> .ssh/authorized_keys

10. Launch the PuTTYgen application.

11. Import the private key you created in step 3.

12. Save the key as a putty private key (*.ppk) file.

13. Launch pagent.

14. Navigate to the pagent icon in the system tray and activate its context menu.

15. Choose the "add key" option to add the private key to pagent.

Logging in!!

1. Launch putty.

2. Enter the host name and other details to login.

3. When you hit the "open" button. you will be prompted for a user name.

4. Enter the user name and hit the enter key.

5. You should be where you reach when you use password based authtication. This is usually the user's home directory.

6. See the initial text that comes up on the screen. It will tell that you have logged in by using a key.

Edit - History - Print - Recent Changes - Search
Page last modified on September 05, 2012, at 02:48 PM