![]() ![]() You may also want to copy the public key to your server, either by copying it out of the ‘Public key for pasting into authorized_keys file’ box (see section 8.2.10), or by using the ‘Save public key’ button ( section 8.2.9). Now you're ready to save the private key to disk press the ‘Save private key’ button. Once you have generated the key, select a comment field ( section 8.2.6) and a passphrase ( section 8.2.7). Then press the ‘Generate’ button, to actually generate the key. This is described in more detail in section 8.2.2 and section 8.2.3. The following sections describe the process in more detail.įirst, you need to select which type of key you want to generate, and also select the strength of the key. This is a general outline of the procedure for generating a new key pair. When you run PuTTYgen you will see a window where you have two choices: ‘Generate’, to generate a new public/private key pair, or ‘Load’ to load in an existing private key. PuTTYgen generates RSA, DSA, ECDSA, and Ed25519 keys. It generates pairs of public and private keys to be used with PuTTY, PSCP, and Plink, as well as the PuTTY authentication agent, Pageant (see chapter 9). The key types supported by PuTTY are described in section 8.2.2.Ĩ.2 Using PuTTYgen, the PuTTY key generator The most common are RSA and ECDSA, but others exist, notably DSA (otherwise known as DSS), the USA's federal Digital Signature Standard. There is more than one public-key algorithm available. Many people feel this is a good compromise between security and convenience. When you close your Windows session, Pageant shuts down, without ever having stored your decrypted private key on disk. For the rest of your session, you can start PuTTY any number of times and Pageant will automatically generate signatures without you having to do anything. When you begin a Windows session, you start Pageant and load your private key into it (typing your passphrase once). PuTTY's authentication agent is called Pageant. One solution to this is to use an authentication agent, a separate program which holds decrypted private keys and generates signatures on request. This can make public-key authentication less convenient than password authentication: every time you log in to the server, instead of typing a short password, you have to type a longer passphrase. In order to generate a signature, PuTTY must decrypt the key, so you have to type your passphrase. For this reason, your private key is usually encrypted when it is stored on your local machine, using a passphrase of your choice. So they will be able to log in to your server under your account. There is a problem with this: if your private key is stored unprotected on your own computer, then anybody who gains access to that will be able to generate signatures as if they were you. And signatures cannot be re-used, so they have gained nothing. Now if the server is hacked or spoofed, the attacker does not gain your private key or password they only gain one signature. The server can verify that signature (since it has your public key) and allow you to log in. Then, when the server asks you to prove who you are, PuTTY can generate a signature using your private key. So you generate a key pair on your own computer, and you copy the public key to the server. ![]() A signature created using your private key cannot be forged by anybody who does not have that key but anybody who has your public key can verify that a particular signature is genuine. The private key is able to generate signatures. You generate a key pair, consisting of a public key (which everybody is allowed to know) and a private key (which you keep secret and do not give to anybody). Public key authentication solves this problem. This means that if the server has been hacked, or spoofed (see section 2.2), an attacker can learn your password. The only way to prove you know the password is to tell the server what you think the password is. In conventional password authentication, you prove you are who you claim to be by proving that you know the correct password. It is more secure and more flexible, but more difficult to set up. Public key authentication is an alternative means of identifying yourself to a login server, instead of typing a password. 8.3 Getting ready for public key authenticationĬhapter 8: Using public keys for SSH authentication 8.1 Public key authentication - an introduction.8.2.12 Dealing with private keys in other formats.8.2.10 ‘Public key for pasting into authorized_keys file’.8.2.9 Saving your public key to a disk file.8.2.8 Saving your private key to a disk file.8.2.7 Setting a passphrase for your key.8.2.3 Selecting the size (strength) of the key.8.2 Using PuTTYgen, the PuTTY key generator.8.1 Public key authentication - an introduction.Chapter 8: Using public keys for SSH authentication. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |