Jump to content

SSH-Keys: Difference between revisions

2 bytes removed ,  21 December 2011
no edit summary
(Update to include ssh-copy-id and changing ssh passphrases.)
No edit summary
 
Line 52: Line 52:
When the program loads up, you will be faced with a a small number of options on the the base of the screen. Select DSA as the key type. It will automatically select 1024 for the number of bits but you can change this number to whatever you want. When you have filled in this information, click on "Generate".
When the program loads up, you will be faced with a a small number of options on the the base of the screen. Select DSA as the key type. It will automatically select 1024 for the number of bits but you can change this number to whatever you want. When you have filled in this information, click on "Generate".


You will be asked to move the mouse around the blank space on the screen. The more you move the mouse, the more random the keys will be. It will generate the keys straight away. You can then enter a passphrase (if you wish) and then confirm it by typing it again. Then click "save private key" to save this key. You will be asked to give the program a destination folder to save the key to and you will need to give it a filename. Do the same for "save private key".
You will be asked to move the mouse around the blank space on the screen. The more you move the mouse, the more random the keys will be. It will generate the keys straight away. You can then enter a passphrase (if you wish) and then confirm it by typing it again. Then click "save private key" to save this key. You will be asked to give the program a destination folder to save the key to and you will need to give it a filename. Do the same for "save public key".


Now once you have saved your keys, press "Load". If you gave it a passphrase, you will need to type it in now. At the top you will see the public key that you will need to copy in to your authorised keys. Highlight it and right click and select copy. Then you'll have to log on to the server you wish to be able to ssh easily too. You will need to go to putty.exe.  
Now once you have saved your keys, press "Load". If you gave it a passphrase, you will need to type it in now. At the top you will see the public key that you will need to copy in to your authorised keys. Highlight it and right click and select copy. Then you'll have to log on to the server you wish to be able to ssh easily too. You will need to go to putty.exe.  
Line 58: Line 58:


You will still be prompted for a password at this stage. Once you are on other machine, you need to move into the .ssh directory cd .ssh. You may need to create a authorized_keys file by doing the following :
You will still be prompted for a password at this stage. Once you are on other machine, you need to move into the .ssh directory cd .ssh. You may need to create a authorized_keys file by doing the following :
  touch ~/.ssh/authorized_keys.
  touch ~/.ssh/authorized_keys  
Then all that is left to do is to put the public key into the authorized_keys file.  
Then all that is left to do is to put the public key into the authorized_keys file.  
  cat >> authorized_keys
  cat >> authorized_keys