|
||||||
| Linux Networking This forum is for Linux Networking Only. Routing, servers, etc. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Click Start, then Run, then enter puttygen in the command-line box. This displays the main dialog box. Select the key parameters, then click Generate. One can choose either an RSA or a DSA key, but do not create an SSH version 1 key of any kind: they're not secure.
You'll be prompted to create some randomness by moving the mouse around: this gives the system some additional entropy which helps create better keys. This takes just a few seconds to fully generate the keypair. Now the keypair has been generated, but exists only in PuTTYgen's memory: it has to be saved to disk to be of any use. Though the public key contains no sensitive information and will be installed on remote systems, the private key must be protected vigorously: anyone knowing the private key has full run of all remote systems. The private key is typically protected with a passphrase, and this phrase is entered twice in the fields indicated. The comment is optional but is customarily the email address of the key owner. It could also just be the owner's name.Do not forget the passphrase; the keypair is useless without it. The key generated must now be saved, and this is done in three parts: Save Public Key and Save Private Key both prompt for a filename, and the private key (with .ppk extension) should be saved in a safe place. The public key is in a standard format and can be used directly or indirectly by other software, and it looks like this: ---- BEGIN SSH2 PUBLIC KEY ---- Comment: "steve@unixwiz.net" AAAAB3NzaC1yc2EAAAABJQAAAIBtZzfrF2AOpwvvU/0ikNgOsFWfP9zW8GlT5iGg c487S3ooA+OY0u882r8/T/dwc6EHJM+QhRdTlv1NBLCmz46R4F5draFhibHEWuKA Qg/UutZbMkC6rpd0H2DBXTTCcZ2y4FL3u5kOV1+XWqmmII568+/twEGAO6MS0HDv OYK+BQ== ---- END SSH2 PUBLIC KEY ---- The private key is in a PuTTY-specific format which can't be used by any other software. It won't ever be looked at directly by the operator. *****INSTALLING PUBLIC KEY ON LINUX SYSTEM With puttygen still open, highlight the entire "Public Key for pasting into OpenSSH authorized_keys file" area and type control-C to copy to the local system's clipboard. This is essentially the same data as found in the saved public-key file, but it's in a form which can be directly used on the Linux system. Login to the Linux computer using the account's password, create the .ssh directory if necessary, then edit the file .ssh/authorized_keys2. This will be a text file, and the clipboard should be pasted into it. Note: the file authorized_keys is for an older format; we're using authorized_keys2. The public key will be just one long line, and it's really easy to paste the data in a way which truncates the first few characters. This renders the key inoperable, so be sure that the key begins ssh-rsa or ssh-dsa. Save the file. |
![]() |
| Tags |
| ssh key |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|