xref: /freebsd/crypto/openssh/ssh-keygen.1 (revision 462c32cb8d7a451c999a3f1e7d00f9c89e96700c)
1*462c32cbSDag-Erling Smørgrav.\"	$OpenBSD: ssh-keygen.1,v 1.109 2012/07/06 00:41:59 dtucker Exp $
2cce7d346SDag-Erling Smørgrav.\"	$FreeBSD$
31e8db6e2SBrian Feldman.\"
4511b41d2SMark Murray.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
5511b41d2SMark Murray.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
6511b41d2SMark Murray.\"                    All rights reserved
7511b41d2SMark Murray.\"
8b66f2d16SKris Kennaway.\" As far as I am concerned, the code I have written for this software
9b66f2d16SKris Kennaway.\" can be used freely for any purpose.  Any derived versions of this
10b66f2d16SKris Kennaway.\" software must be clearly marked as such, and if the derived work is
11b66f2d16SKris Kennaway.\" incompatible with the protocol description in the RFC file, it must be
12b66f2d16SKris Kennaway.\" called by a name other than "ssh" or "Secure Shell".
13511b41d2SMark Murray.\"
14b66f2d16SKris Kennaway.\"
15b66f2d16SKris Kennaway.\" Copyright (c) 1999,2000 Markus Friedl.  All rights reserved.
16b66f2d16SKris Kennaway.\" Copyright (c) 1999 Aaron Campbell.  All rights reserved.
17b66f2d16SKris Kennaway.\" Copyright (c) 1999 Theo de Raadt.  All rights reserved.
18b66f2d16SKris Kennaway.\"
19b66f2d16SKris Kennaway.\" Redistribution and use in source and binary forms, with or without
20b66f2d16SKris Kennaway.\" modification, are permitted provided that the following conditions
21b66f2d16SKris Kennaway.\" are met:
22b66f2d16SKris Kennaway.\" 1. Redistributions of source code must retain the above copyright
23b66f2d16SKris Kennaway.\"    notice, this list of conditions and the following disclaimer.
24b66f2d16SKris Kennaway.\" 2. Redistributions in binary form must reproduce the above copyright
25b66f2d16SKris Kennaway.\"    notice, this list of conditions and the following disclaimer in the
26b66f2d16SKris Kennaway.\"    documentation and/or other materials provided with the distribution.
27b66f2d16SKris Kennaway.\"
28b66f2d16SKris Kennaway.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
29b66f2d16SKris Kennaway.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
30b66f2d16SKris Kennaway.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31b66f2d16SKris Kennaway.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
32b66f2d16SKris Kennaway.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
33b66f2d16SKris Kennaway.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34b66f2d16SKris Kennaway.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35b66f2d16SKris Kennaway.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36b66f2d16SKris Kennaway.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
37b66f2d16SKris Kennaway.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38511b41d2SMark Murray.\"
39*462c32cbSDag-Erling Smørgrav.Dd July 6 2012
40511b41d2SMark Murray.Dt SSH-KEYGEN 1
41511b41d2SMark Murray.Os
42511b41d2SMark Murray.Sh NAME
43511b41d2SMark Murray.Nm ssh-keygen
441e8db6e2SBrian Feldman.Nd authentication key generation, management and conversion
45511b41d2SMark Murray.Sh SYNOPSIS
46d0c8c0bcSDag-Erling Smørgrav.Bk -words
47e2f6069cSDag-Erling Smørgrav.Nm ssh-keygen
481e8db6e2SBrian Feldman.Op Fl q
49511b41d2SMark Murray.Op Fl b Ar bits
50ae1f160dSDag-Erling Smørgrav.Fl t Ar type
51511b41d2SMark Murray.Op Fl N Ar new_passphrase
52511b41d2SMark Murray.Op Fl C Ar comment
53b66f2d16SKris Kennaway.Op Fl f Ar output_keyfile
54511b41d2SMark Murray.Nm ssh-keygen
55511b41d2SMark Murray.Fl p
56511b41d2SMark Murray.Op Fl P Ar old_passphrase
57511b41d2SMark Murray.Op Fl N Ar new_passphrase
58511b41d2SMark Murray.Op Fl f Ar keyfile
59511b41d2SMark Murray.Nm ssh-keygen
601e8db6e2SBrian Feldman.Fl i
61e2f6069cSDag-Erling Smørgrav.Op Fl m Ar key_format
62b66f2d16SKris Kennaway.Op Fl f Ar input_keyfile
63a04a10f8SKris Kennaway.Nm ssh-keygen
641e8db6e2SBrian Feldman.Fl e
65e2f6069cSDag-Erling Smørgrav.Op Fl m Ar key_format
66b66f2d16SKris Kennaway.Op Fl f Ar input_keyfile
67a04a10f8SKris Kennaway.Nm ssh-keygen
68a04a10f8SKris Kennaway.Fl y
69b66f2d16SKris Kennaway.Op Fl f Ar input_keyfile
70a04a10f8SKris Kennaway.Nm ssh-keygen
71511b41d2SMark Murray.Fl c
72511b41d2SMark Murray.Op Fl P Ar passphrase
73511b41d2SMark Murray.Op Fl C Ar comment
74511b41d2SMark Murray.Op Fl f Ar keyfile
75511b41d2SMark Murray.Nm ssh-keygen
76511b41d2SMark Murray.Fl l
77b66f2d16SKris Kennaway.Op Fl f Ar input_keyfile
78a04a10f8SKris Kennaway.Nm ssh-keygen
791e8db6e2SBrian Feldman.Fl B
801e8db6e2SBrian Feldman.Op Fl f Ar input_keyfile
81ae1f160dSDag-Erling Smørgrav.Nm ssh-keygen
82b15c8340SDag-Erling Smørgrav.Fl D Ar pkcs11
83ae1f160dSDag-Erling Smørgrav.Nm ssh-keygen
845e8dbd04SDag-Erling Smørgrav.Fl F Ar hostname
855e8dbd04SDag-Erling Smørgrav.Op Fl f Ar known_hosts_file
86cce7d346SDag-Erling Smørgrav.Op Fl l
875e8dbd04SDag-Erling Smørgrav.Nm ssh-keygen
885e8dbd04SDag-Erling Smørgrav.Fl H
895e8dbd04SDag-Erling Smørgrav.Op Fl f Ar known_hosts_file
905e8dbd04SDag-Erling Smørgrav.Nm ssh-keygen
915e8dbd04SDag-Erling Smørgrav.Fl R Ar hostname
925e8dbd04SDag-Erling Smørgrav.Op Fl f Ar known_hosts_file
935e8dbd04SDag-Erling Smørgrav.Nm ssh-keygen
94d95e11bfSDag-Erling Smørgrav.Fl r Ar hostname
95d95e11bfSDag-Erling Smørgrav.Op Fl f Ar input_keyfile
96d95e11bfSDag-Erling Smørgrav.Op Fl g
97d95e11bfSDag-Erling Smørgrav.Nm ssh-keygen
98d95e11bfSDag-Erling Smørgrav.Fl G Ar output_file
99efcad6b7SDag-Erling Smørgrav.Op Fl v
100d95e11bfSDag-Erling Smørgrav.Op Fl b Ar bits
101d95e11bfSDag-Erling Smørgrav.Op Fl M Ar memory
102d95e11bfSDag-Erling Smørgrav.Op Fl S Ar start_point
103d95e11bfSDag-Erling Smørgrav.Nm ssh-keygen
104d95e11bfSDag-Erling Smørgrav.Fl T Ar output_file
105d95e11bfSDag-Erling Smørgrav.Fl f Ar input_file
106efcad6b7SDag-Erling Smørgrav.Op Fl v
107d95e11bfSDag-Erling Smørgrav.Op Fl a Ar num_trials
108*462c32cbSDag-Erling Smørgrav.Op Fl J Ar num_lines
109*462c32cbSDag-Erling Smørgrav.Op Fl j Ar start_line
110*462c32cbSDag-Erling Smørgrav.Op Fl K Ar checkpt
111d95e11bfSDag-Erling Smørgrav.Op Fl W Ar generator
112b15c8340SDag-Erling Smørgrav.Nm ssh-keygen
113b15c8340SDag-Erling Smørgrav.Fl s Ar ca_key
114b15c8340SDag-Erling Smørgrav.Fl I Ar certificate_identity
115b15c8340SDag-Erling Smørgrav.Op Fl h
116b15c8340SDag-Erling Smørgrav.Op Fl n Ar principals
117e2f6069cSDag-Erling Smørgrav.Op Fl O Ar option
118b15c8340SDag-Erling Smørgrav.Op Fl V Ar validity_interval
119e2f6069cSDag-Erling Smørgrav.Op Fl z Ar serial_number
120b15c8340SDag-Erling Smørgrav.Ar
121b15c8340SDag-Erling Smørgrav.Nm ssh-keygen
122b15c8340SDag-Erling Smørgrav.Fl L
123b15c8340SDag-Erling Smørgrav.Op Fl f Ar input_keyfile
124e146993eSDag-Erling Smørgrav.Nm ssh-keygen
125e146993eSDag-Erling Smørgrav.Fl A
126b15c8340SDag-Erling Smørgrav.Ek
127511b41d2SMark Murray.Sh DESCRIPTION
128511b41d2SMark Murray.Nm
1291e8db6e2SBrian Feldmangenerates, manages and converts authentication keys for
130511b41d2SMark Murray.Xr ssh 1 .
131a04a10f8SKris Kennaway.Nm
1324a421b63SDag-Erling Smørgravcan create RSA keys for use by SSH protocol version 1 and DSA, ECDSA or RSA
133d95e11bfSDag-Erling Smørgravkeys for use by SSH protocol version 2.
134d95e11bfSDag-Erling SmørgravThe type of key to be generated is specified with the
1351e8db6e2SBrian Feldman.Fl t
136ae1f160dSDag-Erling Smørgravoption.
137021d409fSDag-Erling SmørgravIf invoked without any arguments,
138021d409fSDag-Erling Smørgrav.Nm
139021d409fSDag-Erling Smørgravwill generate an RSA key for use in SSH protocol 2 connections.
140a04a10f8SKris Kennaway.Pp
141d95e11bfSDag-Erling Smørgrav.Nm
142d95e11bfSDag-Erling Smørgravis also used to generate groups for use in Diffie-Hellman group
143d95e11bfSDag-Erling Smørgravexchange (DH-GEX).
144d95e11bfSDag-Erling SmørgravSee the
145d95e11bfSDag-Erling Smørgrav.Sx MODULI GENERATION
146d95e11bfSDag-Erling Smørgravsection for details.
147d95e11bfSDag-Erling Smørgrav.Pp
148511b41d2SMark MurrayNormally each user wishing to use SSH
1494a421b63SDag-Erling Smørgravwith public key authentication runs this once to create the authentication
150511b41d2SMark Murraykey in
151043840dfSDag-Erling Smørgrav.Pa ~/.ssh/identity ,
1524a421b63SDag-Erling Smørgrav.Pa ~/.ssh/id_ecdsa ,
153043840dfSDag-Erling Smørgrav.Pa ~/.ssh/id_dsa
154a04a10f8SKris Kennawayor
155043840dfSDag-Erling Smørgrav.Pa ~/.ssh/id_rsa .
156a04a10f8SKris KennawayAdditionally, the system administrator may use this to generate host keys,
157a04a10f8SKris Kennawayas seen in
158a04a10f8SKris Kennaway.Pa /etc/rc .
159511b41d2SMark Murray.Pp
160511b41d2SMark MurrayNormally this program generates the key and asks for a file in which
161a8f6863aSKris Kennawayto store the private key.
162a8f6863aSKris KennawayThe public key is stored in a file with the same name but
163511b41d2SMark Murray.Dq .pub
164a8f6863aSKris Kennawayappended.
165a8f6863aSKris KennawayThe program also asks for a passphrase.
166a8f6863aSKris KennawayThe passphrase may be empty to indicate no passphrase
1671e8db6e2SBrian Feldman(host keys must have an empty passphrase), or it may be a string of
168a8f6863aSKris Kennawayarbitrary length.
169ae1f160dSDag-Erling SmørgravA passphrase is similar to a password, except it can be a phrase with a
170ae1f160dSDag-Erling Smørgravseries of words, punctuation, numbers, whitespace, or any string of
171ae1f160dSDag-Erling Smørgravcharacters you want.
172ae1f160dSDag-Erling SmørgravGood passphrases are 10-30 characters long, are
173511b41d2SMark Murraynot simple sentences or otherwise easily guessable (English
174ae1f160dSDag-Erling Smørgravprose has only 1-2 bits of entropy per character, and provides very bad
175ae1f160dSDag-Erling Smørgravpassphrases), and contain a mix of upper and lowercase letters,
176ae1f160dSDag-Erling Smørgravnumbers, and non-alphanumeric characters.
177a8f6863aSKris KennawayThe passphrase can be changed later by using the
178511b41d2SMark Murray.Fl p
179511b41d2SMark Murrayoption.
180511b41d2SMark Murray.Pp
181a8f6863aSKris KennawayThere is no way to recover a lost passphrase.
182e146993eSDag-Erling SmørgravIf the passphrase is lost or forgotten, a new key must be generated
183e146993eSDag-Erling Smørgravand the corresponding public key copied to other machines.
184511b41d2SMark Murray.Pp
1851e8db6e2SBrian FeldmanFor RSA1 keys,
1861e8db6e2SBrian Feldmanthere is also a comment field in the key file that is only for
187a8f6863aSKris Kennawayconvenience to the user to help identify the key.
188a8f6863aSKris KennawayThe comment can tell what the key is for, or whatever is useful.
189a8f6863aSKris KennawayThe comment is initialized to
190511b41d2SMark Murray.Dq user@host
191511b41d2SMark Murraywhen the key is created, but can be changed using the
192511b41d2SMark Murray.Fl c
193511b41d2SMark Murrayoption.
194511b41d2SMark Murray.Pp
195a04a10f8SKris KennawayAfter a key is generated, instructions below detail where the keys
196a04a10f8SKris Kennawayshould be placed to be activated.
197a04a10f8SKris Kennaway.Pp
198511b41d2SMark MurrayThe options are as follows:
199511b41d2SMark Murray.Bl -tag -width Ds
200e146993eSDag-Erling Smørgrav.It Fl A
201e146993eSDag-Erling SmørgravFor each of the key types (rsa1, rsa, dsa and ecdsa) for which host keys
202e146993eSDag-Erling Smørgravdo not exist, generate the host keys with the default key file path,
203e146993eSDag-Erling Smørgravan empty passphrase, default bits for the key type, and default comment.
204e146993eSDag-Erling SmørgravThis is used by
205e146993eSDag-Erling Smørgrav.Pa /etc/rc
206e146993eSDag-Erling Smørgravto generate new host keys.
207d95e11bfSDag-Erling Smørgrav.It Fl a Ar trials
208d95e11bfSDag-Erling SmørgravSpecifies the number of primality tests to perform when screening DH-GEX
209d95e11bfSDag-Erling Smørgravcandidates using the
210d95e11bfSDag-Erling Smørgrav.Fl T
211d95e11bfSDag-Erling Smørgravcommand.
2125e8dbd04SDag-Erling Smørgrav.It Fl B
2135e8dbd04SDag-Erling SmørgravShow the bubblebabble digest of specified private or public key file.
214511b41d2SMark Murray.It Fl b Ar bits
215a8f6863aSKris KennawaySpecifies the number of bits in the key to create.
216021d409fSDag-Erling SmørgravFor RSA keys, the minimum size is 768 bits and the default is 2048 bits.
217043840dfSDag-Erling SmørgravGenerally, 2048 bits is considered sufficient.
218021d409fSDag-Erling SmørgravDSA keys must be exactly 1024 bits as specified by FIPS 186-2.
219e146993eSDag-Erling SmørgravFor ECDSA keys, the
220e146993eSDag-Erling Smørgrav.Fl b
221*462c32cbSDag-Erling Smørgravflag determines the key length by selecting from one of three elliptic
222e146993eSDag-Erling Smørgravcurve sizes: 256, 384 or 521 bits.
223e146993eSDag-Erling SmørgravAttempting to use bit lengths other than these three values for ECDSA keys
224e146993eSDag-Erling Smørgravwill fail.
2255e8dbd04SDag-Erling Smørgrav.It Fl C Ar comment
2265e8dbd04SDag-Erling SmørgravProvides a new comment.
227511b41d2SMark Murray.It Fl c
228511b41d2SMark MurrayRequests changing the comment in the private and public key files.
229ae1f160dSDag-Erling SmørgravThis operation is only supported for RSA1 keys.
230511b41d2SMark MurrayThe program will prompt for the file containing the private keys, for
231ae1f160dSDag-Erling Smørgravthe passphrase if the key has one, and for the new comment.
232b15c8340SDag-Erling Smørgrav.It Fl D Ar pkcs11
233b15c8340SDag-Erling SmørgravDownload the RSA public keys provided by the PKCS#11 shared library
234b15c8340SDag-Erling Smørgrav.Ar pkcs11 .
235e2f6069cSDag-Erling SmørgravWhen used in combination with
236e2f6069cSDag-Erling Smørgrav.Fl s ,
237e2f6069cSDag-Erling Smørgravthis option indicates that a CA key resides in a PKCS#11 token (see the
238e2f6069cSDag-Erling Smørgrav.Sx CERTIFICATES
239e2f6069cSDag-Erling Smørgravsection for details).
2401e8db6e2SBrian Feldman.It Fl e
2411e8db6e2SBrian FeldmanThis option will read a private or public OpenSSH key file and
242e2f6069cSDag-Erling Smørgravprint to stdout the key in one of the formats specified by the
243e2f6069cSDag-Erling Smørgrav.Fl m
244e2f6069cSDag-Erling Smørgravoption.
245e2f6069cSDag-Erling SmørgravThe default export format is
246e2f6069cSDag-Erling Smørgrav.Dq RFC4716 .
247e2f6069cSDag-Erling SmørgravThis option allows exporting OpenSSH keys for use by other programs, including
248e2f6069cSDag-Erling Smørgravseveral commercial SSH implementations.
2495e8dbd04SDag-Erling Smørgrav.It Fl F Ar hostname
2505e8dbd04SDag-Erling SmørgravSearch for the specified
2515e8dbd04SDag-Erling Smørgrav.Ar hostname
2525e8dbd04SDag-Erling Smørgravin a
2535e8dbd04SDag-Erling Smørgrav.Pa known_hosts
2545e8dbd04SDag-Erling Smørgravfile, listing any occurrences found.
2555e8dbd04SDag-Erling SmørgravThis option is useful to find hashed host names or addresses and may also be
2565e8dbd04SDag-Erling Smørgravused in conjunction with the
2575e8dbd04SDag-Erling Smørgrav.Fl H
2585e8dbd04SDag-Erling Smørgravoption to print found keys in a hashed format.
2595e8dbd04SDag-Erling Smørgrav.It Fl f Ar filename
2605e8dbd04SDag-Erling SmørgravSpecifies the filename of the key file.
2615e8dbd04SDag-Erling Smørgrav.It Fl G Ar output_file
2625e8dbd04SDag-Erling SmørgravGenerate candidate primes for DH-GEX.
2635e8dbd04SDag-Erling SmørgravThese primes must be screened for
2645e8dbd04SDag-Erling Smørgravsafety (using the
2655e8dbd04SDag-Erling Smørgrav.Fl T
2665e8dbd04SDag-Erling Smørgravoption) before use.
267d95e11bfSDag-Erling Smørgrav.It Fl g
268d74d50a8SDag-Erling SmørgravUse generic DNS format when printing fingerprint resource records using the
269d74d50a8SDag-Erling Smørgrav.Fl r
270d74d50a8SDag-Erling Smørgravcommand.
2715e8dbd04SDag-Erling Smørgrav.It Fl H
2725e8dbd04SDag-Erling SmørgravHash a
2735e8dbd04SDag-Erling Smørgrav.Pa known_hosts
2744518870cSDag-Erling Smørgravfile.
2754518870cSDag-Erling SmørgravThis replaces all hostnames and addresses with hashed representations
2764518870cSDag-Erling Smørgravwithin the specified file; the original content is moved to a file with
2774518870cSDag-Erling Smørgrava .old suffix.
2785e8dbd04SDag-Erling SmørgravThese hashes may be used normally by
2795e8dbd04SDag-Erling Smørgrav.Nm ssh
2805e8dbd04SDag-Erling Smørgravand
2815e8dbd04SDag-Erling Smørgrav.Nm sshd ,
2825e8dbd04SDag-Erling Smørgravbut they do not reveal identifying information should the file's contents
2835e8dbd04SDag-Erling Smørgravbe disclosed.
2845e8dbd04SDag-Erling SmørgravThis option will not modify existing hashed hostnames and is therefore safe
2855e8dbd04SDag-Erling Smørgravto use on files that mix hashed and non-hashed names.
286b15c8340SDag-Erling Smørgrav.It Fl h
287b15c8340SDag-Erling SmørgravWhen signing a key, create a host certificate instead of a user
288b15c8340SDag-Erling Smørgravcertificate.
289b15c8340SDag-Erling SmørgravPlease see the
290b15c8340SDag-Erling Smørgrav.Sx CERTIFICATES
291b15c8340SDag-Erling Smørgravsection for details.
292b15c8340SDag-Erling Smørgrav.It Fl I Ar certificate_identity
293b15c8340SDag-Erling SmørgravSpecify the key identity when signing a public key.
294b15c8340SDag-Erling SmørgravPlease see the
295b15c8340SDag-Erling Smørgrav.Sx CERTIFICATES
296b15c8340SDag-Erling Smørgravsection for details.
2971e8db6e2SBrian Feldman.It Fl i
2981e8db6e2SBrian FeldmanThis option will read an unencrypted private (or public) key file
299e2f6069cSDag-Erling Smørgravin the format specified by the
300e2f6069cSDag-Erling Smørgrav.Fl m
301e2f6069cSDag-Erling Smørgravoption and print an OpenSSH compatible private
3021e8db6e2SBrian Feldman(or public) key to stdout.
303*462c32cbSDag-Erling Smørgrav.It Fl J Ar num_lines
304*462c32cbSDag-Erling SmørgravExit after screening the specified number of lines
305*462c32cbSDag-Erling Smørgravwhile performing DH candidate screening using the
306*462c32cbSDag-Erling Smørgrav.Fl T
307*462c32cbSDag-Erling Smørgravoption.
308*462c32cbSDag-Erling Smørgrav.It Fl j Ar start_line
309*462c32cbSDag-Erling SmørgravStart screening at the specified line number
310*462c32cbSDag-Erling Smørgravwhile performing DH candidate screening using the
311*462c32cbSDag-Erling Smørgrav.Fl T
312*462c32cbSDag-Erling Smørgravoption.
313*462c32cbSDag-Erling Smørgrav.It Fl K Ar checkpt
314*462c32cbSDag-Erling SmørgravWrite the last line processed to the file
315*462c32cbSDag-Erling Smørgrav.Ar checkpt
316*462c32cbSDag-Erling Smørgravwhile performing DH candidate screening using the
317*462c32cbSDag-Erling Smørgrav.Fl T
318*462c32cbSDag-Erling Smørgravoption.
319*462c32cbSDag-Erling SmørgravThis will be used to skip lines in the input file that have already been
320*462c32cbSDag-Erling Smørgravprocessed if the job is restarted.
321e2f6069cSDag-Erling SmørgravThis option allows importing keys from other software, including several
322e2f6069cSDag-Erling Smørgravcommercial SSH implementations.
323e2f6069cSDag-Erling SmørgravThe default import format is
324e2f6069cSDag-Erling Smørgrav.Dq RFC4716 .
325b15c8340SDag-Erling Smørgrav.It Fl L
326b15c8340SDag-Erling SmørgravPrints the contents of a certificate.
327511b41d2SMark Murray.It Fl l
328ae1f160dSDag-Erling SmørgravShow fingerprint of specified public key file.
329ae1f160dSDag-Erling SmørgravPrivate RSA1 keys are also supported.
330ae1f160dSDag-Erling SmørgravFor RSA and DSA keys
331ae1f160dSDag-Erling Smørgrav.Nm
332ae1f160dSDag-Erling Smørgravtries to find the matching public key file and prints its fingerprint.
333d4af9e69SDag-Erling SmørgravIf combined with
334d4af9e69SDag-Erling Smørgrav.Fl v ,
335d4af9e69SDag-Erling Smørgravan ASCII art representation of the key is supplied with the fingerprint.
3365e8dbd04SDag-Erling Smørgrav.It Fl M Ar memory
3375e8dbd04SDag-Erling SmørgravSpecify the amount of memory to use (in megabytes) when generating
3385e8dbd04SDag-Erling Smørgravcandidate moduli for DH-GEX.
339e2f6069cSDag-Erling Smørgrav.It Fl m Ar key_format
340e2f6069cSDag-Erling SmørgravSpecify a key format for the
341e2f6069cSDag-Erling Smørgrav.Fl i
342e2f6069cSDag-Erling Smørgrav(import) or
343e2f6069cSDag-Erling Smørgrav.Fl e
344e2f6069cSDag-Erling Smørgrav(export) conversion options.
345e2f6069cSDag-Erling SmørgravThe supported key formats are:
346e2f6069cSDag-Erling Smørgrav.Dq RFC4716
347e2f6069cSDag-Erling Smørgrav(RFC 4716/SSH2 public or private key),
348e2f6069cSDag-Erling Smørgrav.Dq PKCS8
349e2f6069cSDag-Erling Smørgrav(PEM PKCS8 public key)
350e2f6069cSDag-Erling Smørgravor
351e2f6069cSDag-Erling Smørgrav.Dq PEM
352e2f6069cSDag-Erling Smørgrav(PEM public key).
353e2f6069cSDag-Erling SmørgravThe default conversion format is
354e2f6069cSDag-Erling Smørgrav.Dq RFC4716 .
3555e8dbd04SDag-Erling Smørgrav.It Fl N Ar new_passphrase
3565e8dbd04SDag-Erling SmørgravProvides the new passphrase.
357b15c8340SDag-Erling Smørgrav.It Fl n Ar principals
358b15c8340SDag-Erling SmørgravSpecify one or more principals (user or host names) to be included in
359b15c8340SDag-Erling Smørgrava certificate when signing a key.
360b15c8340SDag-Erling SmørgravMultiple principals may be specified, separated by commas.
361b15c8340SDag-Erling SmørgravPlease see the
362b15c8340SDag-Erling Smørgrav.Sx CERTIFICATES
363b15c8340SDag-Erling Smørgravsection for details.
364e2f6069cSDag-Erling Smørgrav.It Fl O Ar option
365e2f6069cSDag-Erling SmørgravSpecify a certificate option when signing a key.
366b15c8340SDag-Erling SmørgravThis option may be specified multiple times.
367b15c8340SDag-Erling SmørgravPlease see the
368b15c8340SDag-Erling Smørgrav.Sx CERTIFICATES
369b15c8340SDag-Erling Smørgravsection for details.
370e2f6069cSDag-Erling SmørgravThe options that are valid for user certificates are:
371b15c8340SDag-Erling Smørgrav.Bl -tag -width Ds
3728ad9b54aSDag-Erling Smørgrav.It Ic clear
3738ad9b54aSDag-Erling SmørgravClear all enabled permissions.
3748ad9b54aSDag-Erling SmørgravThis is useful for clearing the default set of permissions so permissions may
3758ad9b54aSDag-Erling Smørgravbe added individually.
3768ad9b54aSDag-Erling Smørgrav.It Ic force-command Ns = Ns Ar command
3778ad9b54aSDag-Erling SmørgravForces the execution of
3788ad9b54aSDag-Erling Smørgrav.Ar command
3798ad9b54aSDag-Erling Smørgravinstead of any shell or command specified by the user when
3808ad9b54aSDag-Erling Smørgravthe certificate is used for authentication.
381b15c8340SDag-Erling Smørgrav.It Ic no-agent-forwarding
382b15c8340SDag-Erling SmørgravDisable
383b15c8340SDag-Erling Smørgrav.Xr ssh-agent 1
384b15c8340SDag-Erling Smørgravforwarding (permitted by default).
385b15c8340SDag-Erling Smørgrav.It Ic no-port-forwarding
386b15c8340SDag-Erling SmørgravDisable port forwarding (permitted by default).
387b15c8340SDag-Erling Smørgrav.It Ic no-pty
388b15c8340SDag-Erling SmørgravDisable PTY allocation (permitted by default).
389b15c8340SDag-Erling Smørgrav.It Ic no-user-rc
390b15c8340SDag-Erling SmørgravDisable execution of
391b15c8340SDag-Erling Smørgrav.Pa ~/.ssh/rc
392b15c8340SDag-Erling Smørgravby
393b15c8340SDag-Erling Smørgrav.Xr sshd 8
394b15c8340SDag-Erling Smørgrav(permitted by default).
3958ad9b54aSDag-Erling Smørgrav.It Ic no-x11-forwarding
3968ad9b54aSDag-Erling SmørgravDisable X11 forwarding (permitted by default).
397b15c8340SDag-Erling Smørgrav.It Ic permit-agent-forwarding
398b15c8340SDag-Erling SmørgravAllows
399b15c8340SDag-Erling Smørgrav.Xr ssh-agent 1
400b15c8340SDag-Erling Smørgravforwarding.
401b15c8340SDag-Erling Smørgrav.It Ic permit-port-forwarding
402b15c8340SDag-Erling SmørgravAllows port forwarding.
403b15c8340SDag-Erling Smørgrav.It Ic permit-pty
404b15c8340SDag-Erling SmørgravAllows PTY allocation.
405b15c8340SDag-Erling Smørgrav.It Ic permit-user-rc
406b15c8340SDag-Erling SmørgravAllows execution of
407b15c8340SDag-Erling Smørgrav.Pa ~/.ssh/rc
408b15c8340SDag-Erling Smørgravby
409b15c8340SDag-Erling Smørgrav.Xr sshd 8 .
4108ad9b54aSDag-Erling Smørgrav.It Ic permit-x11-forwarding
4118ad9b54aSDag-Erling SmørgravAllows X11 forwarding.
4128ad9b54aSDag-Erling Smørgrav.It Ic source-address Ns = Ns Ar address_list
4138ad9b54aSDag-Erling SmørgravRestrict the source addresses from which the certificate is considered valid.
414b15c8340SDag-Erling SmørgravThe
415b15c8340SDag-Erling Smørgrav.Ar address_list
416b15c8340SDag-Erling Smørgravis a comma-separated list of one or more address/netmask pairs in CIDR
417b15c8340SDag-Erling Smørgravformat.
418b15c8340SDag-Erling Smørgrav.El
419b15c8340SDag-Erling Smørgrav.Pp
420e2f6069cSDag-Erling SmørgravAt present, no options are valid for host keys.
4215e8dbd04SDag-Erling Smørgrav.It Fl P Ar passphrase
4225e8dbd04SDag-Erling SmørgravProvides the (old) passphrase.
423511b41d2SMark Murray.It Fl p
424511b41d2SMark MurrayRequests changing the passphrase of a private key file instead of
425a8f6863aSKris Kennawaycreating a new private key.
426a8f6863aSKris KennawayThe program will prompt for the file
427511b41d2SMark Murraycontaining the private key, for the old passphrase, and twice for the
428511b41d2SMark Murraynew passphrase.
429511b41d2SMark Murray.It Fl q
430511b41d2SMark MurraySilence
431511b41d2SMark Murray.Nm ssh-keygen .
4325e8dbd04SDag-Erling Smørgrav.It Fl R Ar hostname
4335e8dbd04SDag-Erling SmørgravRemoves all keys belonging to
4345e8dbd04SDag-Erling Smørgrav.Ar hostname
4355e8dbd04SDag-Erling Smørgravfrom a
4365e8dbd04SDag-Erling Smørgrav.Pa known_hosts
4375e8dbd04SDag-Erling Smørgravfile.
4385e8dbd04SDag-Erling SmørgravThis option is useful to delete hashed hosts (see the
4395e8dbd04SDag-Erling Smørgrav.Fl H
4405e8dbd04SDag-Erling Smørgravoption above).
4415e8dbd04SDag-Erling Smørgrav.It Fl r Ar hostname
4425e8dbd04SDag-Erling SmørgravPrint the SSHFP fingerprint resource record named
4435e8dbd04SDag-Erling Smørgrav.Ar hostname
4445e8dbd04SDag-Erling Smørgravfor the specified public key file.
4455e8dbd04SDag-Erling Smørgrav.It Fl S Ar start
4465e8dbd04SDag-Erling SmørgravSpecify start point (in hex) when generating candidate moduli for DH-GEX.
447b15c8340SDag-Erling Smørgrav.It Fl s Ar ca_key
448b15c8340SDag-Erling SmørgravCertify (sign) a public key using the specified CA key.
449b15c8340SDag-Erling SmørgravPlease see the
450b15c8340SDag-Erling Smørgrav.Sx CERTIFICATES
451b15c8340SDag-Erling Smørgravsection for details.
4525e8dbd04SDag-Erling Smørgrav.It Fl T Ar output_file
4535e8dbd04SDag-Erling SmørgravTest DH group exchange candidate primes (generated using the
4545e8dbd04SDag-Erling Smørgrav.Fl G
4555e8dbd04SDag-Erling Smørgravoption) for safety.
4561e8db6e2SBrian Feldman.It Fl t Ar type
4575e8dbd04SDag-Erling SmørgravSpecifies the type of key to create.
4581e8db6e2SBrian FeldmanThe possible values are
4591e8db6e2SBrian Feldman.Dq rsa1
4601e8db6e2SBrian Feldmanfor protocol version 1 and
4614a421b63SDag-Erling Smørgrav.Dq dsa ,
4624a421b63SDag-Erling Smørgrav.Dq ecdsa
4631e8db6e2SBrian Feldmanor
4644a421b63SDag-Erling Smørgrav.Dq rsa
4651e8db6e2SBrian Feldmanfor protocol version 2.
466b15c8340SDag-Erling Smørgrav.It Fl V Ar validity_interval
467b15c8340SDag-Erling SmørgravSpecify a validity interval when signing a certificate.
468b15c8340SDag-Erling SmørgravA validity interval may consist of a single time, indicating that the
469b15c8340SDag-Erling Smørgravcertificate is valid beginning now and expiring at that time, or may consist
470b15c8340SDag-Erling Smørgravof two times separated by a colon to indicate an explicit time interval.
471b15c8340SDag-Erling SmørgravThe start time may be specified as a date in YYYYMMDD format, a time
472b15c8340SDag-Erling Smørgravin YYYYMMDDHHMMSS format or a relative time (to the current time) consisting
473b15c8340SDag-Erling Smørgravof a minus sign followed by a relative time in the format described in the
474b15c8340SDag-Erling Smørgrav.Sx TIME FORMATS
475b15c8340SDag-Erling Smørgravsection of
4768ad9b54aSDag-Erling Smørgrav.Xr sshd_config 5 .
477b15c8340SDag-Erling SmørgravThe end time may be specified as a YYYYMMDD date, a YYYYMMDDHHMMSS time or
478b15c8340SDag-Erling Smørgrava relative time starting with a plus character.
479b15c8340SDag-Erling Smørgrav.Pp
480b15c8340SDag-Erling SmørgravFor example:
481b15c8340SDag-Erling Smørgrav.Dq +52w1d
482b15c8340SDag-Erling Smørgrav(valid from now to 52 weeks and one day from now),
483b15c8340SDag-Erling Smørgrav.Dq -4w:+4w
484b15c8340SDag-Erling Smørgrav(valid from four weeks ago to four weeks from now),
485b15c8340SDag-Erling Smørgrav.Dq 20100101123000:20110101123000
486b15c8340SDag-Erling Smørgrav(valid from 12:30 PM, January 1st, 2010 to 12:30 PM, January 1st, 2011),
487b15c8340SDag-Erling Smørgrav.Dq -1d:20110101
488b15c8340SDag-Erling Smørgrav(valid from yesterday to midnight, January 1st, 2011).
489efcad6b7SDag-Erling Smørgrav.It Fl v
490efcad6b7SDag-Erling SmørgravVerbose mode.
491efcad6b7SDag-Erling SmørgravCauses
492efcad6b7SDag-Erling Smørgrav.Nm
493efcad6b7SDag-Erling Smørgravto print debugging messages about its progress.
494efcad6b7SDag-Erling SmørgravThis is helpful for debugging moduli generation.
495efcad6b7SDag-Erling SmørgravMultiple
496efcad6b7SDag-Erling Smørgrav.Fl v
497efcad6b7SDag-Erling Smørgravoptions increase the verbosity.
498efcad6b7SDag-Erling SmørgravThe maximum is 3.
4995e8dbd04SDag-Erling Smørgrav.It Fl W Ar generator
5005e8dbd04SDag-Erling SmørgravSpecify desired generator when testing candidate moduli for DH-GEX.
5015e8dbd04SDag-Erling Smørgrav.It Fl y
5025e8dbd04SDag-Erling SmørgravThis option will read a private
5035e8dbd04SDag-Erling SmørgravOpenSSH format file and print an OpenSSH public key to stdout.
504e2f6069cSDag-Erling Smørgrav.It Fl z Ar serial_number
505e2f6069cSDag-Erling SmørgravSpecifies a serial number to be embedded in the certificate to distinguish
506e2f6069cSDag-Erling Smørgravthis certificate from others from the same CA.
507e2f6069cSDag-Erling SmørgravThe default serial number is zero.
508511b41d2SMark Murray.El
509d95e11bfSDag-Erling Smørgrav.Sh MODULI GENERATION
510d95e11bfSDag-Erling Smørgrav.Nm
511d95e11bfSDag-Erling Smørgravmay be used to generate groups for the Diffie-Hellman Group Exchange
512d95e11bfSDag-Erling Smørgrav(DH-GEX) protocol.
513d95e11bfSDag-Erling SmørgravGenerating these groups is a two-step process: first, candidate
514d95e11bfSDag-Erling Smørgravprimes are generated using a fast, but memory intensive process.
515d95e11bfSDag-Erling SmørgravThese candidate primes are then tested for suitability (a CPU-intensive
516d95e11bfSDag-Erling Smørgravprocess).
517d95e11bfSDag-Erling Smørgrav.Pp
518d95e11bfSDag-Erling SmørgravGeneration of primes is performed using the
519d95e11bfSDag-Erling Smørgrav.Fl G
520d95e11bfSDag-Erling Smørgravoption.
521d95e11bfSDag-Erling SmørgravThe desired length of the primes may be specified by the
522d95e11bfSDag-Erling Smørgrav.Fl b
523d95e11bfSDag-Erling Smørgravoption.
524d95e11bfSDag-Erling SmørgravFor example:
525d95e11bfSDag-Erling Smørgrav.Pp
5265e8dbd04SDag-Erling Smørgrav.Dl # ssh-keygen -G moduli-2048.candidates -b 2048
527d95e11bfSDag-Erling Smørgrav.Pp
528d95e11bfSDag-Erling SmørgravBy default, the search for primes begins at a random point in the
529d95e11bfSDag-Erling Smørgravdesired length range.
530d95e11bfSDag-Erling SmørgravThis may be overridden using the
531d95e11bfSDag-Erling Smørgrav.Fl S
532d95e11bfSDag-Erling Smørgravoption, which specifies a different start point (in hex).
533d95e11bfSDag-Erling Smørgrav.Pp
534*462c32cbSDag-Erling SmørgravOnce a set of candidates have been generated, they must be screened for
535d95e11bfSDag-Erling Smørgravsuitability.
536d95e11bfSDag-Erling SmørgravThis may be performed using the
537d95e11bfSDag-Erling Smørgrav.Fl T
538d95e11bfSDag-Erling Smørgravoption.
539d95e11bfSDag-Erling SmørgravIn this mode
540d95e11bfSDag-Erling Smørgrav.Nm
541d95e11bfSDag-Erling Smørgravwill read candidates from standard input (or a file specified using the
542d95e11bfSDag-Erling Smørgrav.Fl f
543d95e11bfSDag-Erling Smørgravoption).
544d95e11bfSDag-Erling SmørgravFor example:
545d95e11bfSDag-Erling Smørgrav.Pp
5465e8dbd04SDag-Erling Smørgrav.Dl # ssh-keygen -T moduli-2048 -f moduli-2048.candidates
547d95e11bfSDag-Erling Smørgrav.Pp
548d95e11bfSDag-Erling SmørgravBy default, each candidate will be subjected to 100 primality tests.
549d95e11bfSDag-Erling SmørgravThis may be overridden using the
550d95e11bfSDag-Erling Smørgrav.Fl a
551d95e11bfSDag-Erling Smørgravoption.
552d95e11bfSDag-Erling SmørgravThe DH generator value will be chosen automatically for the
553d95e11bfSDag-Erling Smørgravprime under consideration.
554d95e11bfSDag-Erling SmørgravIf a specific generator is desired, it may be requested using the
555d95e11bfSDag-Erling Smørgrav.Fl W
556d95e11bfSDag-Erling Smørgravoption.
5575e8dbd04SDag-Erling SmørgravValid generator values are 2, 3, and 5.
558d95e11bfSDag-Erling Smørgrav.Pp
559d95e11bfSDag-Erling SmørgravScreened DH groups may be installed in
560d95e11bfSDag-Erling Smørgrav.Pa /etc/moduli .
561d95e11bfSDag-Erling SmørgravIt is important that this file contains moduli of a range of bit lengths and
562d95e11bfSDag-Erling Smørgravthat both ends of a connection share common moduli.
563b15c8340SDag-Erling Smørgrav.Sh CERTIFICATES
564b15c8340SDag-Erling Smørgrav.Nm
565b15c8340SDag-Erling Smørgravsupports signing of keys to produce certificates that may be used for
566b15c8340SDag-Erling Smørgravuser or host authentication.
567b15c8340SDag-Erling SmørgravCertificates consist of a public key, some identity information, zero or
568e2f6069cSDag-Erling Smørgravmore principal (user or host) names and a set of options that
569b15c8340SDag-Erling Smørgravare signed by a Certification Authority (CA) key.
570b15c8340SDag-Erling SmørgravClients or servers may then trust only the CA key and verify its signature
571b15c8340SDag-Erling Smørgravon a certificate rather than trusting many user/host keys.
572b15c8340SDag-Erling SmørgravNote that OpenSSH certificates are a different, and much simpler, format to
573b15c8340SDag-Erling Smørgravthe X.509 certificates used in
574b15c8340SDag-Erling Smørgrav.Xr ssl 8 .
575b15c8340SDag-Erling Smørgrav.Pp
576b15c8340SDag-Erling Smørgrav.Nm
577b15c8340SDag-Erling Smørgravsupports two types of certificates: user and host.
578b15c8340SDag-Erling SmørgravUser certificates authenticate users to servers, whereas host certificates
579b15c8340SDag-Erling Smørgravauthenticate server hosts to users.
580b15c8340SDag-Erling SmørgravTo generate a user certificate:
581b15c8340SDag-Erling Smørgrav.Pp
582b15c8340SDag-Erling Smørgrav.Dl $ ssh-keygen -s /path/to/ca_key -I key_id /path/to/user_key.pub
583b15c8340SDag-Erling Smørgrav.Pp
584b15c8340SDag-Erling SmørgravThe resultant certificate will be placed in
5858ad9b54aSDag-Erling Smørgrav.Pa /path/to/user_key-cert.pub .
586b15c8340SDag-Erling SmørgravA host certificate requires the
587b15c8340SDag-Erling Smørgrav.Fl h
588b15c8340SDag-Erling Smørgravoption:
589b15c8340SDag-Erling Smørgrav.Pp
590b15c8340SDag-Erling Smørgrav.Dl $ ssh-keygen -s /path/to/ca_key -I key_id -h /path/to/host_key.pub
591b15c8340SDag-Erling Smørgrav.Pp
592b15c8340SDag-Erling SmørgravThe host certificate will be output to
5938ad9b54aSDag-Erling Smørgrav.Pa /path/to/host_key-cert.pub .
594e2f6069cSDag-Erling Smørgrav.Pp
595e2f6069cSDag-Erling SmørgravIt is possible to sign using a CA key stored in a PKCS#11 token by
596e2f6069cSDag-Erling Smørgravproviding the token library using
597e2f6069cSDag-Erling Smørgrav.Fl D
598e2f6069cSDag-Erling Smørgravand identifying the CA key by providing its public half as an argument
599e2f6069cSDag-Erling Smørgravto
600e2f6069cSDag-Erling Smørgrav.Fl s :
601e2f6069cSDag-Erling Smørgrav.Pp
602e2f6069cSDag-Erling Smørgrav.Dl $ ssh-keygen -s ca_key.pub -D libpkcs11.so -I key_id host_key.pub
603e2f6069cSDag-Erling Smørgrav.Pp
604e2f6069cSDag-Erling SmørgravIn all cases,
605b15c8340SDag-Erling Smørgrav.Ar key_id
606b15c8340SDag-Erling Smørgravis a "key identifier" that is logged by the server when the certificate
607b15c8340SDag-Erling Smørgravis used for authentication.
608b15c8340SDag-Erling Smørgrav.Pp
609b15c8340SDag-Erling SmørgravCertificates may be limited to be valid for a set of principal (user/host)
610b15c8340SDag-Erling Smørgravnames.
611b15c8340SDag-Erling SmørgravBy default, generated certificates are valid for all users or hosts.
612b15c8340SDag-Erling SmørgravTo generate a certificate for a specified set of principals:
613b15c8340SDag-Erling Smørgrav.Pp
614b15c8340SDag-Erling Smørgrav.Dl $ ssh-keygen -s ca_key -I key_id -n user1,user2 user_key.pub
6158ad9b54aSDag-Erling Smørgrav.Dl "$ ssh-keygen -s ca_key -I key_id -h -n host.domain user_key.pub"
616b15c8340SDag-Erling Smørgrav.Pp
617b15c8340SDag-Erling SmørgravAdditional limitations on the validity and use of user certificates may
618e2f6069cSDag-Erling Smørgravbe specified through certificate options.
619e2f6069cSDag-Erling SmørgravA certificate option may disable features of the SSH session, may be
620b15c8340SDag-Erling Smørgravvalid only when presented from particular source addresses or may
621b15c8340SDag-Erling Smørgravforce the use of a specific command.
622e2f6069cSDag-Erling SmørgravFor a list of valid certificate options, see the documentation for the
623b15c8340SDag-Erling Smørgrav.Fl O
624b15c8340SDag-Erling Smørgravoption above.
625b15c8340SDag-Erling Smørgrav.Pp
626b15c8340SDag-Erling SmørgravFinally, certificates may be defined with a validity lifetime.
627b15c8340SDag-Erling SmørgravThe
628b15c8340SDag-Erling Smørgrav.Fl V
629b15c8340SDag-Erling Smørgravoption allows specification of certificate start and end times.
630b15c8340SDag-Erling SmørgravA certificate that is presented at a time outside this range will not be
631b15c8340SDag-Erling Smørgravconsidered valid.
632b15c8340SDag-Erling SmørgravBy default, certificates have a maximum validity interval.
633b15c8340SDag-Erling Smørgrav.Pp
634b15c8340SDag-Erling SmørgravFor certificates to be used for user or host authentication, the CA
635b15c8340SDag-Erling Smørgravpublic key must be trusted by
636b15c8340SDag-Erling Smørgrav.Xr sshd 8
637b15c8340SDag-Erling Smørgravor
638b15c8340SDag-Erling Smørgrav.Xr ssh 1 .
639b15c8340SDag-Erling SmørgravPlease refer to those manual pages for details.
640511b41d2SMark Murray.Sh FILES
6414a421b63SDag-Erling Smørgrav.Bl -tag -width Ds -compact
642043840dfSDag-Erling Smørgrav.It Pa ~/.ssh/identity
6431e8db6e2SBrian FeldmanContains the protocol version 1 RSA authentication identity of the user.
644a8f6863aSKris KennawayThis file should not be readable by anyone but the user.
645a8f6863aSKris KennawayIt is possible to
646511b41d2SMark Murrayspecify a passphrase when generating the key; that passphrase will be
6474a421b63SDag-Erling Smørgravused to encrypt the private part of this file using 3DES.
648a8f6863aSKris KennawayThis file is not automatically accessed by
649511b41d2SMark Murray.Nm
650511b41d2SMark Murraybut it is offered as the default file for the private key.
651ae1f160dSDag-Erling Smørgrav.Xr ssh 1
652a04a10f8SKris Kennawaywill read this file when a login attempt is made.
6534a421b63SDag-Erling Smørgrav.Pp
654043840dfSDag-Erling Smørgrav.It Pa ~/.ssh/identity.pub
6551e8db6e2SBrian FeldmanContains the protocol version 1 RSA public key for authentication.
656a8f6863aSKris KennawayThe contents of this file should be added to
657043840dfSDag-Erling Smørgrav.Pa ~/.ssh/authorized_keys
658511b41d2SMark Murrayon all machines
659ae1f160dSDag-Erling Smørgravwhere the user wishes to log in using RSA authentication.
660a8f6863aSKris KennawayThere is no need to keep the contents of this file secret.
6614a421b63SDag-Erling Smørgrav.Pp
662043840dfSDag-Erling Smørgrav.It Pa ~/.ssh/id_dsa
6634a421b63SDag-Erling Smørgrav.It Pa ~/.ssh/id_ecdsa
664043840dfSDag-Erling Smørgrav.It Pa ~/.ssh/id_rsa
6654a421b63SDag-Erling SmørgravContains the protocol version 2 DSA, ECDSA or RSA authentication identity of the user.
6661e8db6e2SBrian FeldmanThis file should not be readable by anyone but the user.
6671e8db6e2SBrian FeldmanIt is possible to
6681e8db6e2SBrian Feldmanspecify a passphrase when generating the key; that passphrase will be
669b15c8340SDag-Erling Smørgravused to encrypt the private part of this file using 128-bit AES.
6701e8db6e2SBrian FeldmanThis file is not automatically accessed by
6711e8db6e2SBrian Feldman.Nm
6721e8db6e2SBrian Feldmanbut it is offered as the default file for the private key.
673ae1f160dSDag-Erling Smørgrav.Xr ssh 1
6741e8db6e2SBrian Feldmanwill read this file when a login attempt is made.
6754a421b63SDag-Erling Smørgrav.Pp
6764a421b63SDag-Erling Smørgrav.It Pa ~/.ssh/id_dsa.pub
6774a421b63SDag-Erling Smørgrav.It Pa ~/.ssh/id_ecdsa.pub
678043840dfSDag-Erling Smørgrav.It Pa ~/.ssh/id_rsa.pub
6794a421b63SDag-Erling SmørgravContains the protocol version 2 DSA, ECDSA or RSA public key for authentication.
6801e8db6e2SBrian FeldmanThe contents of this file should be added to
681043840dfSDag-Erling Smørgrav.Pa ~/.ssh/authorized_keys
6821e8db6e2SBrian Feldmanon all machines
683ae1f160dSDag-Erling Smørgravwhere the user wishes to log in using public key authentication.
684a04a10f8SKris KennawayThere is no need to keep the contents of this file secret.
6854a421b63SDag-Erling Smørgrav.Pp
686d95e11bfSDag-Erling Smørgrav.It Pa /etc/moduli
687d95e11bfSDag-Erling SmørgravContains Diffie-Hellman groups used for DH-GEX.
688d95e11bfSDag-Erling SmørgravThe file format is described in
689d95e11bfSDag-Erling Smørgrav.Xr moduli 5 .
690b66f2d16SKris Kennaway.El
691511b41d2SMark Murray.Sh SEE ALSO
692511b41d2SMark Murray.Xr ssh 1 ,
693511b41d2SMark Murray.Xr ssh-add 1 ,
694511b41d2SMark Murray.Xr ssh-agent 1 ,
695d95e11bfSDag-Erling Smørgrav.Xr moduli 5 ,
6961e8db6e2SBrian Feldman.Xr sshd 8
6971e8db6e2SBrian Feldman.Rs
698d4af9e69SDag-Erling Smørgrav.%R RFC 4716
699d4af9e69SDag-Erling Smørgrav.%T "The Secure Shell (SSH) Public Key File Format"
700d4af9e69SDag-Erling Smørgrav.%D 2006
7011e8db6e2SBrian Feldman.Re
702d95e11bfSDag-Erling Smørgrav.Sh AUTHORS
703d95e11bfSDag-Erling SmørgravOpenSSH is a derivative of the original and free
704d95e11bfSDag-Erling Smørgravssh 1.2.12 release by Tatu Ylonen.
705d95e11bfSDag-Erling SmørgravAaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
706d95e11bfSDag-Erling SmørgravTheo de Raadt and Dug Song
707d95e11bfSDag-Erling Smørgravremoved many bugs, re-added newer features and
708d95e11bfSDag-Erling Smørgravcreated OpenSSH.
709d95e11bfSDag-Erling SmørgravMarkus Friedl contributed the support for SSH
710d95e11bfSDag-Erling Smørgravprotocol versions 1.5 and 2.0.
711