]> andersk Git - openssh.git/blame - ssh-keygen.1
- Add Andre Lucas' <andre.lucas@dial.pipex.com> patch to read entropy
[openssh.git] / ssh-keygen.1
CommitLineData
bf740959 1.\" -*- nroff -*-
2.\"
3.\" ssh-keygen.1
4.\"
5.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
6.\"
7.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8.\" All rights reserved
9.\"
10.\" Created: Sat Apr 22 23:55:14 1995 ylo
11.\"
12.\" $Id$
13.\"
14.Dd September 25, 1999
15.Dt SSH-KEYGEN 1
16.Os
17.Sh NAME
18.Nm ssh-keygen
19.Nd authentication key generation
20.Sh SYNOPSIS
21.Nm ssh-keygen
22.Op Fl q
23.Op Fl b Ar bits
24.Op Fl N Ar new_passphrase
25.Op Fl C Ar comment
f095fcc7 26.Op Fl f Ar keyfile
bf740959 27.Nm ssh-keygen
28.Fl p
29.Op Fl P Ar old_passphrase
30.Op Fl N Ar new_passphrase
f095fcc7 31.Op Fl f Ar keyfile
bf740959 32.Nm ssh-keygen
33.Fl c
34.Op Fl P Ar passphrase
35.Op Fl C Ar comment
f095fcc7 36.Op Fl f Ar keyfile
37.Nm ssh-keygen
38.Fl l
39.Op Fl f Ar keyfile
a306f2dd 40.Nm ssh-keygen
41.Fl R
f54651ce 42.Sh DESCRIPTION
bf740959 43.Nm
f54651ce 44generates and manages authentication keys for
bf740959 45.Xr ssh 1 .
46Normally each user wishing to use SSH
47with RSA authentication runs this once to create the authentication
48key in
49.Pa $HOME/.ssh/identity .
50Additionally, the system administrator may use this to generate host keys.
51.Pp
52Normally this program generates the key and asks for a file in which
4fe2af09 53to store the private key.
54The public key is stored in a file with the same name but
bf740959 55.Dq .pub
4fe2af09 56appended.
57The program also asks for a passphrase.
58The passphrase may be empty to indicate no passphrase
bf740959 59(host keys must have empty passphrase), or it may be a string of
4fe2af09 60arbitrary length.
61Good passphrases are 10-30 characters long and are
bf740959 62not simple sentences or otherwise easily guessable (English
63prose has only 1-2 bits of entropy per word, and provides very bad
4fe2af09 64passphrases).
65The passphrase can be changed later by using the
bf740959 66.Fl p
67option.
68.Pp
4fe2af09 69There is no way to recover a lost passphrase.
70If the passphrase is
bf740959 71lost or forgotten, you will have to generate a new key and copy the
72corresponding public key to other machines.
73.Pp
74There is also a comment field in the key file that is only for
4fe2af09 75convenience to the user to help identify the key.
76The comment can tell what the key is for, or whatever is useful.
77The comment is initialized to
bf740959 78.Dq user@host
79when the key is created, but can be changed using the
80.Fl c
81option.
82.Pp
83The options are as follows:
84.Bl -tag -width Ds
85.It Fl b Ar bits
4fe2af09 86Specifies the number of bits in the key to create.
87Minimum is 512 bits.
88Generally 1024 bits is considered sufficient, and key sizes
89above that no longer improve security but make things slower.
90The default is 1024 bits.
bf740959 91.It Fl c
92Requests changing the comment in the private and public key files.
93The program will prompt for the file containing the private keys, for
94passphrase if the key has one, and for the new comment.
f095fcc7 95.It Fl f
96Specifies the filename of the key file.
97.It Fl l
98Show fingerprint of specified private or public key file.
bf740959 99.It Fl p
100Requests changing the passphrase of a private key file instead of
4fe2af09 101creating a new private key.
102The program will prompt for the file
bf740959 103containing the private key, for the old passphrase, and twice for the
104new passphrase.
105.It Fl q
106Silence
107.Nm ssh-keygen .
108Used by
109.Pa /etc/rc
110when creating a new key.
111.It Fl C Ar comment
112Provides the new comment.
113.It Fl N Ar new_passphrase
114Provides the new passphrase.
115.It Fl P Ar passphrase
116Provides the (old) passphrase.
a306f2dd 117.It Fl R
118If RSA support is functional, immediately exits with code 0. If RSA
119support is not functional, exits with code 1. This flag will be
120removed once the RSA patent expires.
bf740959 121.El
122.Sh FILES
123.Bl -tag -width Ds
bf740959 124.It Pa $HOME/.ssh/identity
4fe2af09 125Contains the RSA authentication identity of the user.
126This file should not be readable by anyone but the user.
127It is possible to
bf740959 128specify a passphrase when generating the key; that passphrase will be
4fe2af09 129used to encrypt the private part of this file using 3DES.
130This file is not automatically accessed by
bf740959 131.Nm
132but it is offered as the default file for the private key.
133.It Pa $HOME/.ssh/identity.pub
4fe2af09 134Contains the public key for authentication.
135The contents of this file should be added to
bf740959 136.Pa $HOME/.ssh/authorized_keys
137on all machines
4fe2af09 138where you wish to log in using RSA authentication.
139There is no need to keep the contents of this file secret.
bf740959 140.Sh AUTHOR
141Tatu Ylonen <ylo@cs.hut.fi>
142.Pp
143OpenSSH
144is a derivative of the original (free) ssh 1.2.12 release, but with bugs
4fe2af09 145removed and newer features re-added.
146Rapidly after the 1.2.12 release,
147newer versions bore successively more restrictive licenses.
148This version of OpenSSH
bf740959 149.Bl -bullet
150.It
371ecff9 151has all components of a restrictive nature (i.e., patents)
bf740959 152directly removed from the source code; any licensed or patented components
153are chosen from
154external libraries.
155.It
156has been updated to support ssh protocol 1.5.
157.It
f54651ce 158contains added support for
bf740959 159.Xr kerberos 8
160authentication and ticket passing.
161.It
162supports one-time password authentication with
163.Xr skey 1 .
164.El
bf740959 165.Sh SEE ALSO
166.Xr ssh 1 ,
167.Xr ssh-add 1 ,
0c372277 168.Xr ssh-agent 1 ,
bf740959 169.Xr sshd 8 ,
This page took 0.839324 seconds and 5 git commands to generate.