OSDN Git Service

Delete unused source files for 1.98d.
[ffftp/ffftp.git] / putty / DOC / PUBKEY.BUT
diff --git a/putty/DOC/PUBKEY.BUT b/putty/DOC/PUBKEY.BUT
deleted file mode 100644 (file)
index 580c6ee..0000000
+++ /dev/null
@@ -1,442 +0,0 @@
-\define{versionidpubkey} \versionid $Id: pubkey.but 8607 2009-07-12 12:02:58Z simon $\r
-\r
-\C{pubkey} Using public keys for SSH authentication\r
-\r
-\H{pubkey-intro} \ii{Public key authentication} - an introduction\r
-\r
-Public key authentication is an alternative means of identifying\r
-yourself to a login server, instead of typing a password. It is more\r
-secure and more flexible, but more difficult to set up.\r
-\r
-In conventional password authentication, you prove you are who you\r
-claim to be by proving that you know the correct password. The only\r
-way to prove you know the password is to tell the server what you\r
-think the password is. This means that if the server has been\r
-hacked, or \i\e{spoofed} (see \k{gs-hostkey}), an attacker can learn\r
-your password.\r
-\r
-Public key authentication solves this problem. You generate a \i\e{key\r
-pair}, consisting of a \i{public key} (which everybody is allowed to\r
-know) and a \i{private key} (which you keep secret and do not give to\r
-anybody). The private key is able to generate \i\e{signatures}.\r
-A signature created using your private key cannot be forged by\r
-anybody who does not have that key; but anybody who has your public\r
-key can verify that a particular signature is genuine.\r
-\r
-So you generate a key pair on your own computer, and you copy the\r
-public key to the server. Then, when the server asks you to prove\r
-who you are, PuTTY can generate a signature using your private key.\r
-The server can verify that signature (since it has your public key)\r
-and allow you to log in. Now if the server is hacked or spoofed, the\r
-attacker does not gain your private key or password; they only gain\r
-one signature. And signatures cannot be re-used, so they have gained\r
-nothing.\r
-\r
-There is a problem with this: if your private key is stored\r
-unprotected on your own computer, then anybody who gains access to\r
-\e{that} will be able to generate signatures as if they were you. So\r
-they will be able to log in to your server under your account. For\r
-this reason, your private key is usually \i\e{encrypted} when it is\r
-stored on your local machine, using a \i{passphrase} of your choice. In\r
-order to generate a signature, PuTTY must decrypt the key, so you\r
-have to type your passphrase.\r
-\r
-This can make public-key authentication less convenient than\r
-password authentication: every time you log in to the server,\r
-instead of typing a short password, you have to type a longer\r
-passphrase. One solution to this is to use an \i\e{authentication\r
-agent}, a separate program which holds decrypted private keys and\r
-generates signatures on request. PuTTY's authentication agent is\r
-called \i{Pageant}. When you begin a Windows session, you start Pageant\r
-and load your private key into it (typing your passphrase once). For\r
-the rest of your session, you can start PuTTY any number of times\r
-and Pageant will automatically generate signatures without you\r
-having to do anything. When you close your Windows session, Pageant\r
-shuts down, without ever having stored your decrypted private key on\r
-disk. Many people feel this is a good compromise between security\r
-and convenience. See \k{pageant} for further details.\r
-\r
-There is more than one \i{public-key algorithm} available. The most\r
-common is \i{RSA}, but others exist, notably \i{DSA} (otherwise known as\r
-DSS), the USA's federal Digital Signature Standard. The key types\r
-supported by PuTTY are described in \k{puttygen-keytype}.\r
-\r
-\H{pubkey-puttygen} Using \i{PuTTYgen}, the PuTTY key generator\r
-\r
-\cfg{winhelp-topic}{puttygen.general}\r
-\r
-PuTTYgen is a key generator. It \I{generating keys}generates pairs of\r
-public and private keys to be used with PuTTY, PSCP, and Plink, as well\r
-as the PuTTY authentication agent, Pageant (see \k{pageant}).  PuTTYgen\r
-generates RSA and DSA keys.\r
-\r
-When you run PuTTYgen you will see a window where you have two\r
-choices: \q{Generate}, to generate a new public/private key pair, or\r
-\q{Load} to load in an existing private key.\r
-\r
-\S{puttygen-generating} Generating a new key\r
-\r
-This is a general outline of the procedure for generating a new key\r
-pair. The following sections describe the process in more detail.\r
-\r
-\b First, you need to select which type of key you want to generate,\r
-and also select the strength of the key. This is described in more\r
-detail in \k{puttygen-keytype} and\r
-\k{puttygen-strength}.\r
-\r
-\b Then press the \q{Generate} button, to actually generate the key.\r
-\K{puttygen-generate} describes this step.\r
-\r
-\b Once you have generated the key, select a comment field\r
-(\k{puttygen-comment}) and a passphrase (\k{puttygen-passphrase}).\r
-\r
-\b Now you're ready to save the private key to disk; press the\r
-\q{Save private key} button. (See \k{puttygen-savepriv}).\r
-\r
-Your key pair is now ready for use. You may also want to copy the\r
-public key to your server, either by copying it out of the \q{Public\r
-key for pasting into authorized_keys file} box (see\r
-\k{puttygen-pastekey}), or by using the \q{Save public key} button\r
-(\k{puttygen-savepub}). However, you don't need to do this\r
-immediately; if you want, you can load the private key back into\r
-PuTTYgen later (see \k{puttygen-load}) and the public key will be\r
-available for copying and pasting again.\r
-\r
-\K{pubkey-gettingready} describes the typical process of configuring\r
-PuTTY to attempt public-key authentication, and configuring your SSH\r
-server to accept it.\r
-\r
-\S{puttygen-keytype} Selecting the type of key\r
-\r
-\cfg{winhelp-topic}{puttygen.keytype}\r
-\r
-Before generating a key pair using PuTTYgen, you need to select\r
-which type of key you need. PuTTYgen currently supports three types\r
-of key:\r
-\r
-\b An \i{RSA} key for use with the SSH-1 protocol.\r
-\r
-\b An RSA key for use with the SSH-2 protocol.\r
-\r
-\b A \i{DSA} key for use with the SSH-2 protocol.\r
-\r
-The SSH-1 protocol only supports RSA keys; if you will be connecting\r
-using the SSH-1 protocol, you must select the first key type or your\r
-key will be completely useless.\r
-\r
-The SSH-2 protocol supports more than one key type. The two types\r
-supported by PuTTY are RSA and DSA.\r
-\r
-The PuTTY developers \e{strongly} recommend you use RSA.\r
-\I{security risk}\i{DSA} has an intrinsic weakness which makes it very\r
-easy to create a signature which contains enough information to give\r
-away the \e{private} key!\r
-This would allow an attacker to pretend to be you for any number of\r
-future sessions. PuTTY's implementation has taken very careful\r
-precautions to avoid this weakness, but we cannot be 100% certain we\r
-have managed it, and if you have the choice we strongly recommend\r
-using RSA keys instead.\r
-\r
-If you really need to connect to an SSH server which only supports\r
-DSA, then you probably have no choice but to use DSA. If you do use\r
-DSA, we recommend you do not use the same key to authenticate with\r
-more than one server.\r
-\r
-\S{puttygen-strength} Selecting the size (strength) of the key\r
-\r
-\cfg{winhelp-topic}{puttygen.bits}\r
-\r
-The \q{Number of bits} input box allows you to choose the strength\r
-of the key PuTTYgen will generate.\r
-\r
-Currently 1024 bits should be sufficient for most purposes.\r
-\r
-Note that an RSA key is generated by finding two primes of half the\r
-length requested, and then multiplying them together. For example,\r
-if you ask PuTTYgen for a 1024-bit RSA key, it will create two\r
-512-bit primes and multiply them. The result of this multiplication\r
-might be 1024 bits long, or it might be only 1023; so you may not\r
-get the exact length of key you asked for. This is perfectly normal,\r
-and you do not need to worry. The lengths should only ever differ by\r
-one, and there is no perceptible drop in security as a result.\r
-\r
-DSA keys are not created by multiplying primes together, so they\r
-should always be exactly the length you asked for.\r
-\r
-\S{puttygen-generate} The \q{Generate} button\r
-\r
-\cfg{winhelp-topic}{puttygen.generate}\r
-\r
-Once you have chosen the type of key you want, and the strength of\r
-the key, press the \q{Generate} button and PuTTYgen will begin the\r
-process of actually generating the key.\r
-\r
-First, a progress bar will appear and PuTTYgen will ask you to move\r
-the mouse around to generate randomness. Wave the mouse in circles\r
-over the blank area in the PuTTYgen window, and the progress bar\r
-will gradually fill up as PuTTYgen collects enough randomness. You\r
-don't need to wave the mouse in particularly imaginative patterns\r
-(although it can't hurt); PuTTYgen will collect enough randomness\r
-just from the fine detail of \e{exactly} how far the mouse has moved\r
-each time Windows samples its position.\r
-\r
-When the progress bar reaches the end, PuTTYgen will begin creating\r
-the key. The progress bar will reset to the start, and gradually\r
-move up again to track the progress of the key generation. It will\r
-not move evenly, and may occasionally slow down to a stop; this is\r
-unfortunately unavoidable, because key generation is a random\r
-process and it is impossible to reliably predict how long it will\r
-take.\r
-\r
-When the key generation is complete, a new set of controls will\r
-appear in the window to indicate this.\r
-\r
-\S{puttygen-fingerprint} The \q{\ii{Key fingerprint}} box\r
-\r
-\cfg{winhelp-topic}{puttygen.fingerprint}\r
-\r
-The \q{Key fingerprint} box shows you a fingerprint value for the\r
-generated key. This is derived cryptographically from the \e{public}\r
-key value, so it doesn't need to be kept secret.\r
-\r
-The fingerprint value is intended to be cryptographically secure, in\r
-the sense that it is computationally infeasible for someone to\r
-invent a second key with the same fingerprint, or to find a key with\r
-a particular fingerprint. So some utilities, such as the Pageant key\r
-list box (see \k{pageant-mainwin-keylist}) and the Unix \c{ssh-add}\r
-utility, will list key fingerprints rather than the whole public key.\r
-\r
-\S{puttygen-comment} Setting a comment for your key\r
-\r
-\cfg{winhelp-topic}{puttygen.comment}\r
-\r
-If you have more than one key and use them for different purposes,\r
-you don't need to memorise the key fingerprints in order to tell\r
-them apart. PuTTYgen allows you to enter a \e{comment} for your key,\r
-which will be displayed whenever PuTTY or Pageant asks you for the\r
-passphrase.\r
-\r
-The default comment format, if you don't specify one, contains the\r
-key type and the date of generation, such as \c{rsa-key-20011212}.\r
-Another commonly used approach is to use your name and the name of\r
-the computer the key will be used on, such as \c{simon@simons-pc}.\r
-\r
-To alter the key comment, just type your comment text into the\r
-\q{Key comment} box before saving the private key. If you want to\r
-change the comment later, you can load the private key back into\r
-PuTTYgen, change the comment, and save it again.\r
-\r
-\S{puttygen-passphrase} Setting a \i{passphrase} for your key\r
-\r
-\cfg{winhelp-topic}{puttygen.passphrase}\r
-\r
-The \q{Key passphrase} and \q{Confirm passphrase} boxes allow you to\r
-choose a passphrase for your key. The passphrase will be used to\r
-\i{encrypt} the key on disk, so you will not be able to use the key\r
-without first entering the passphrase.\r
-\r
-When you save the key, PuTTYgen will check that the \q{Key passphrase}\r
-and \q{Confirm passphrase} boxes both contain exactly the same\r
-passphrase, and will refuse to save the key otherwise.\r
-\r
-If you leave the passphrase fields blank, the key will be saved\r
-unencrypted. You should \e{not} do this without good reason; if you\r
-do, your private key file on disk will be all an attacker needs to\r
-gain access to any machine configured to accept that key. If you\r
-want to be able to \I{passwordless login}log in without having to\r
-type a passphrase every time, you should consider using Pageant\r
-(\k{pageant}) so that your decrypted key is only held in memory\r
-rather than on disk.\r
-\r
-Under special circumstances you may genuinely \e{need} to use a key\r
-with no passphrase; for example, if you need to run an automated\r
-batch script that needs to make an SSH connection, you can't be\r
-there to type the passphrase. In this case we recommend you generate\r
-a special key for each specific batch script (or whatever) that\r
-needs one, and on the server side you should arrange that each key\r
-is \e{restricted} so that it can only be used for that specific\r
-purpose. The documentation for your SSH server should explain how to\r
-do this (it will probably vary between servers).\r
-\r
-Choosing a good passphrase is difficult. Just as you shouldn't use a\r
-dictionary word as a password because it's easy for an attacker to\r
-run through a whole dictionary, you should not use a song lyric,\r
-quotation or other well-known sentence as a passphrase. \i{DiceWare}\r
-(\W{http://www.diceware.com/}\cw{www.diceware.com}) recommends using\r
-at least five words each generated randomly by rolling five dice,\r
-which gives over 2^64 possible passphrases and is probably not a bad\r
-scheme. If you want your passphrase to make grammatical sense, this\r
-cuts down the possibilities a lot and you should use a longer one as\r
-a result.\r
-\r
-\e{Do not forget your passphrase}. There is no way to recover it.\r
-\r
-\S{puttygen-savepriv} Saving your private key to a disk file\r
-\r
-\cfg{winhelp-topic}{puttygen.savepriv}\r
-\r
-Once you have generated a key, set a comment field and set a\r
-passphrase, you are ready to save your private key to disk.\r
-\r
-Press the \q{Save private key} button. PuTTYgen will put up a dialog\r
-box asking you where to save the file. Select a directory, type in a\r
-file name, and press \q{Save}.\r
-\r
-This file is in PuTTY's native format (\c{*.\i{PPK}}); it is the one you\r
-will need to tell PuTTY to use for authentication (see\r
-\k{config-ssh-privkey}) or tell Pageant to load (see\r
-\k{pageant-mainwin-addkey}).\r
-\r
-\S{puttygen-savepub} Saving your public key to a disk file\r
-\r
-\cfg{winhelp-topic}{puttygen.savepub}\r
-\r
-RFC 4716 specifies a \I{SSH-2 public key format}standard format for\r
-storing SSH-2 public keys on disk. Some SSH servers (such as\r
-\i\cw{ssh.com}'s) require a public key in this format in order to accept\r
-authentication with the corresponding private key. (Others, such as\r
-OpenSSH, use a different format; see \k{puttygen-pastekey}.)\r
-\r
-To save your public key in the SSH-2 standard format, press the\r
-\q{Save public key} button in PuTTYgen. PuTTYgen will put up a\r
-dialog box asking you where to save the file. Select a directory,\r
-type in a file name, and press \q{Save}.\r
-\r
-You will then probably want to copy the public key file to your SSH\r
-server machine. See \k{pubkey-gettingready} for general instructions\r
-on configuring public-key authentication once you have generated a\r
-key.\r
-\r
-If you use this option with an SSH-1 key, the file PuTTYgen saves\r
-will contain exactly the same text that appears in the \q{Public key\r
-for pasting} box. This is the only existing standard for SSH-1\r
-public keys.\r
-\r
-\S{puttygen-pastekey} \q{Public key for pasting into \i{authorized_keys\r
-file}}\r
-\r
-\cfg{winhelp-topic}{puttygen.pastekey}\r
-\r
-All SSH-1 servers require your public key to be given to it in a\r
-one-line format before it will accept authentication with your\r
-private key. The \i{OpenSSH} server also requires this for SSH-2.\r
-\r
-The \q{Public key for pasting into authorized_keys file} gives the\r
-public-key data in the correct one-line format. Typically you will\r
-want to select the entire contents of the box using the mouse, press\r
-Ctrl+C to copy it to the clipboard, and then paste the data into a\r
-PuTTY session which is already connected to the server.\r
-\r
-See \k{pubkey-gettingready} for general instructions on configuring\r
-public-key authentication once you have generated a key.\r
-\r
-\S{puttygen-load} Reloading a private key\r
-\r
-\cfg{winhelp-topic}{puttygen.load}\r
-\r
-PuTTYgen allows you to load an existing private key file into\r
-memory. If you do this, you can then change the passphrase and\r
-comment before saving it again; you can also make extra copies of\r
-the public key.\r
-\r
-To load an existing key, press the \q{Load} button. PuTTYgen will\r
-put up a dialog box where you can browse around the file system and\r
-find your key file. Once you select the file, PuTTYgen will ask you\r
-for a passphrase (if necessary) and will then display the key\r
-details in the same way as if it had just generated the key.\r
-\r
-If you use the Load command to load a foreign key format, it will\r
-work, but you will see a message box warning you that the key you\r
-have loaded is not a PuTTY native key. See \k{puttygen-conversions}\r
-for information about importing foreign key formats.\r
-\r
-\S{puttygen-conversions} Dealing with private keys in other formats\r
-\r
-\cfg{winhelp-topic}{puttygen.conversions}\r
-\r
-Most SSH-1 clients use a standard format for storing private keys on\r
-disk. PuTTY uses this format as well; so if you have generated an\r
-SSH-1 private key using OpenSSH or \cw{ssh.com}'s client, you can use\r
-it with PuTTY, and vice versa.\r
-\r
-However, SSH-2 private keys have no standard format. \I{OpenSSH private\r
-key format}OpenSSH and \I{ssh.com private key format}\cw{ssh.com} have\r
-different formats, and PuTTY's is different again.\r
-So a key generated with one client cannot immediately be used with\r
-another.\r
-\r
-Using the \I{importing keys}\q{Import} command from the \q{Conversions}\r
-menu, PuTTYgen can load SSH-2 private keys in OpenSSH's format and\r
-\cw{ssh.com}'s format. Once you have loaded one of these key types, you\r
-can then save it back out as a PuTTY-format key (\c{*.\i{PPK}}) so that\r
-you can use it with the PuTTY suite. The passphrase will be unchanged by this\r
-process (unless you deliberately change it). You may want to change\r
-the key comment before you save the key, since OpenSSH's SSH-2 key\r
-format contains no space for a comment and \cw{ssh.com}'s default\r
-comment format is long and verbose.\r
-\r
-PuTTYgen can also \i{export private keys} in OpenSSH format and in\r
-\cw{ssh.com} format. To do so, select one of the \q{Export} options\r
-from the \q{Conversions} menu. Exporting a key works exactly like\r
-saving it (see \k{puttygen-savepriv}) - you need to have typed your\r
-passphrase in beforehand, and you will be warned if you are about to\r
-save a key without a passphrase.\r
-\r
-Note that since only SSH-2 keys come in different formats, the export\r
-options are not available if you have generated an SSH-1 key.\r
-\r
-\H{pubkey-gettingready} Getting ready for public key authentication\r
-\r
-Connect to your SSH server using PuTTY with the SSH protocol. When the\r
-connection succeeds you will be prompted for your user name and\r
-password to login. Once logged in, you must configure the server to\r
-accept your public key for authentication:\r
-\r
-\b If your server is using the SSH-1 protocol, you should change\r
-into the \i\c{.ssh} directory and open the file \i\c{authorized_keys}\r
-with your favourite editor. (You may have to create this file if\r
-this is the first key you have put in it). Then switch to the\r
-PuTTYgen window, select all of the text in the \q{Public key for\r
-pasting into authorized_keys file} box (see \k{puttygen-pastekey}),\r
-and copy it to the clipboard (\c{Ctrl+C}). Then, switch back to the\r
-PuTTY window and insert the data into the open file, making sure it\r
-ends up all on one line. Save the file.\r
-\r
-\b If your server is \i{OpenSSH} and is using the SSH-2 protocol, you\r
-should follow the same instructions, except that in earlier versions\r
-of OpenSSH 2 the file might be called \c{authorized_keys2}. (In\r
-modern versions the same \c{authorized_keys} file is used for both\r
-SSH-1 and SSH-2 keys.)\r
-\r
-\b If your server is \i\cw{ssh.com}'s product and is using SSH-2, you\r
-need to save a \e{public} key file from PuTTYgen (see\r
-\k{puttygen-savepub}), and copy that into the \i\c{.ssh2} directory on\r
-the server. Then you should go into that \c{.ssh2} directory, and edit\r
-(or create) a file called \c{authorization}. In this file you should\r
-put a line like \c{Key mykey.pub}, with \c{mykey.pub} replaced by the\r
-name of your key file.\r
-\r
-\b For other SSH server software, you should refer to the manual for\r
-that server.\r
-\r
-You may also need to ensure that your home directory, your \c{.ssh}\r
-directory, and any other files involved (such as\r
-\c{authorized_keys}, \c{authorized_keys2} or \c{authorization}) are\r
-not group-writable or world-writable. You can typically do this by\r
-using a command such as\r
-\r
-\c chmod go-w $HOME $HOME/.ssh $HOME/.ssh/authorized_keys\r
-\r
-Your server should now be configured to accept authentication using\r
-your private key. Now you need to configure PuTTY to \e{attempt}\r
-authentication using your private key. You can do this in any of\r
-three ways:\r
-\r
-\b Select the private key in PuTTY's configuration. See\r
-\k{config-ssh-privkey} for details.\r
-\r
-\b Specify the key file on the command line with the \c{-i} option.\r
-See \k{using-cmdline-identity} for details.\r
-\r
-\b Load the private key into Pageant (see \k{pageant}). In this case\r
-PuTTY will automatically try to use it for authentication if it can.\r