Thursday, March 22, 2007

Because I using Putty to configure the Linux server at my office,
so I choose public-private key as authenticate method.
Here some step to configure your Linux environment so the key authentication method.

- First we must generate a public-private key pair using putty key generator, just click the Generator button,
and move your mouse along the blank area. Make sure the key type is SSH-2 RSA, for security reason.


- After you finish you will see the following window, after that insert your passphrase key, and key comment. And copy paste your public key to notepad, and safe that with name "authorized_keys" , and also click the "Save Public Key" button and "Save private key" button to save yours private key and yours public key. The public key and private key must in the same folder, so It can work.


- After you safe then copy the "authorized_keys" file to .ssh directory at your home folder on linux folder, if the directory not exists the create a new one, you can use pscp to copy from your local folder to the remote folder. I assumed that pscp apps already on your path.
pscp "c:Documents and Settings\ronaldo.ronaldo\keya\uthorized_keys" ronaldo@shiro.office.loc:/home/ronaldo/.ssh

- After the file copied to your home directory at your linux server, the final step is to connect to your linux server using your newly generated key here the command that I use to connect to my Linux server :
putty -i "c:Documents and Settings\ronaldo.ronaldo\key\my-privkey.ppk" shiro.office.loc -l ronaldo

No comments: