ssh-keygen.1 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218
  1. .\" $OpenBSD: ssh-keygen.1,v 1.209 2020/09/09 03:08:01 djm Exp $
  2. .\"
  3. .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
  4. .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  5. .\" All rights reserved
  6. .\"
  7. .\" As far as I am concerned, the code I have written for this software
  8. .\" can be used freely for any purpose. Any derived versions of this
  9. .\" software must be clearly marked as such, and if the derived work is
  10. .\" incompatible with the protocol description in the RFC file, it must be
  11. .\" called by a name other than "ssh" or "Secure Shell".
  12. .\"
  13. .\"
  14. .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
  15. .\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
  16. .\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
  17. .\"
  18. .\" Redistribution and use in source and binary forms, with or without
  19. .\" modification, are permitted provided that the following conditions
  20. .\" are met:
  21. .\" 1. Redistributions of source code must retain the above copyright
  22. .\" notice, this list of conditions and the following disclaimer.
  23. .\" 2. Redistributions in binary form must reproduce the above copyright
  24. .\" notice, this list of conditions and the following disclaimer in the
  25. .\" documentation and/or other materials provided with the distribution.
  26. .\"
  27. .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  28. .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  29. .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  30. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  31. .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  32. .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  33. .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  34. .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  35. .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  36. .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  37. .\"
  38. .Dd $Mdocdate: November 27 2020 $
  39. .Dt SSH-KEYGEN 1
  40. .Os
  41. .Sh NAME
  42. .Nm ssh-keygen
  43. .Nd OpenSSH authentication key utility
  44. .Sh SYNOPSIS
  45. .Nm ssh-keygen
  46. .Op Fl q
  47. .Op Fl a Ar rounds
  48. .Op Fl b Ar bits
  49. .Op Fl C Ar comment
  50. .Op Fl f Ar output_keyfile
  51. .Op Fl m Ar format
  52. .Op Fl N Ar new_passphrase
  53. .Op Fl O Ar option
  54. .Op Fl t Cm dsa | ecdsa | ecdsa-sk | ed25519 | ed25519-sk | rsa
  55. .Op Fl w Ar provider
  56. .Op Fl Z Ar cipher
  57. .Nm ssh-keygen
  58. .Fl p
  59. .Op Fl a Ar rounds
  60. .Op Fl f Ar keyfile
  61. .Op Fl m Ar format
  62. .Op Fl N Ar new_passphrase
  63. .Op Fl P Ar old_passphrase
  64. .Op Fl Z Ar cipher
  65. .Nm ssh-keygen
  66. .Fl i
  67. .Op Fl f Ar input_keyfile
  68. .Op Fl m Ar key_format
  69. .Nm ssh-keygen
  70. .Fl e
  71. .Op Fl f Ar input_keyfile
  72. .Op Fl m Ar key_format
  73. .Nm ssh-keygen
  74. .Fl y
  75. .Op Fl f Ar input_keyfile
  76. .Nm ssh-keygen
  77. .Fl c
  78. .Op Fl a Ar rounds
  79. .Op Fl C Ar comment
  80. .Op Fl f Ar keyfile
  81. .Op Fl P Ar passphrase
  82. .Nm ssh-keygen
  83. .Fl l
  84. .Op Fl v
  85. .Op Fl E Ar fingerprint_hash
  86. .Op Fl f Ar input_keyfile
  87. .Nm ssh-keygen
  88. .Fl B
  89. .Op Fl f Ar input_keyfile
  90. .Nm ssh-keygen
  91. .Fl D Ar pkcs11
  92. .Nm ssh-keygen
  93. .Fl F Ar hostname
  94. .Op Fl lv
  95. .Op Fl f Ar known_hosts_file
  96. .Nm ssh-keygen
  97. .Fl H
  98. .Op Fl f Ar known_hosts_file
  99. .Nm ssh-keygen
  100. .Fl K
  101. .Op Fl a Ar rounds
  102. .Op Fl w Ar provider
  103. .Nm ssh-keygen
  104. .Fl R Ar hostname
  105. .Op Fl f Ar known_hosts_file
  106. .Nm ssh-keygen
  107. .Fl r Ar hostname
  108. .Op Fl g
  109. .Op Fl f Ar input_keyfile
  110. .Nm ssh-keygen
  111. .Fl M Cm generate
  112. .Op Fl O Ar option
  113. .Ar output_file
  114. .Nm ssh-keygen
  115. .Fl M Cm screen
  116. .Op Fl f Ar input_file
  117. .Op Fl O Ar option
  118. .Ar output_file
  119. .Nm ssh-keygen
  120. .Fl I Ar certificate_identity
  121. .Fl s Ar ca_key
  122. .Op Fl hU
  123. .Op Fl D Ar pkcs11_provider
  124. .Op Fl n Ar principals
  125. .Op Fl O Ar option
  126. .Op Fl V Ar validity_interval
  127. .Op Fl z Ar serial_number
  128. .Ar
  129. .Nm ssh-keygen
  130. .Fl L
  131. .Op Fl f Ar input_keyfile
  132. .Nm ssh-keygen
  133. .Fl A
  134. .Op Fl a Ar rounds
  135. .Op Fl f Ar prefix_path
  136. .Nm ssh-keygen
  137. .Fl k
  138. .Fl f Ar krl_file
  139. .Op Fl u
  140. .Op Fl s Ar ca_public
  141. .Op Fl z Ar version_number
  142. .Ar
  143. .Nm ssh-keygen
  144. .Fl Q
  145. .Op Fl l
  146. .Fl f Ar krl_file
  147. .Ar
  148. .Nm ssh-keygen
  149. .Fl Y Cm find-principals
  150. .Fl s Ar signature_file
  151. .Fl f Ar allowed_signers_file
  152. .Nm ssh-keygen
  153. .Fl Y Cm check-novalidate
  154. .Fl n Ar namespace
  155. .Fl s Ar signature_file
  156. .Nm ssh-keygen
  157. .Fl Y Cm sign
  158. .Fl f Ar key_file
  159. .Fl n Ar namespace
  160. .Ar
  161. .Nm ssh-keygen
  162. .Fl Y Cm verify
  163. .Fl f Ar allowed_signers_file
  164. .Fl I Ar signer_identity
  165. .Fl n Ar namespace
  166. .Fl s Ar signature_file
  167. .Op Fl r Ar revocation_file
  168. .Sh DESCRIPTION
  169. .Nm
  170. generates, manages and converts authentication keys for
  171. .Xr ssh 1 .
  172. .Nm
  173. can create keys for use by SSH protocol version 2.
  174. .Pp
  175. The type of key to be generated is specified with the
  176. .Fl t
  177. option.
  178. If invoked without any arguments,
  179. .Nm
  180. will generate an RSA key.
  181. .Pp
  182. .Nm
  183. is also used to generate groups for use in Diffie-Hellman group
  184. exchange (DH-GEX).
  185. See the
  186. .Sx MODULI GENERATION
  187. section for details.
  188. .Pp
  189. Finally,
  190. .Nm
  191. can be used to generate and update Key Revocation Lists, and to test whether
  192. given keys have been revoked by one.
  193. See the
  194. .Sx KEY REVOCATION LISTS
  195. section for details.
  196. .Pp
  197. Normally each user wishing to use SSH
  198. with public key authentication runs this once to create the authentication
  199. key in
  200. .Pa ~/.ssh/id_dsa ,
  201. .Pa ~/.ssh/id_ecdsa ,
  202. .Pa ~/.ssh/id_ecdsa_sk ,
  203. .Pa ~/.ssh/id_ed25519 ,
  204. .Pa ~/.ssh/id_ed25519_sk
  205. or
  206. .Pa ~/.ssh/id_rsa .
  207. Additionally, the system administrator may use this to generate host keys.
  208. .Pp
  209. Normally this program generates the key and asks for a file in which
  210. to store the private key.
  211. The public key is stored in a file with the same name but
  212. .Dq .pub
  213. appended.
  214. The program also asks for a passphrase.
  215. The passphrase may be empty to indicate no passphrase
  216. (host keys must have an empty passphrase), or it may be a string of
  217. arbitrary length.
  218. A passphrase is similar to a password, except it can be a phrase with a
  219. series of words, punctuation, numbers, whitespace, or any string of
  220. characters you want.
  221. Good passphrases are 10-30 characters long, are
  222. not simple sentences or otherwise easily guessable (English
  223. prose has only 1-2 bits of entropy per character, and provides very bad
  224. passphrases), and contain a mix of upper and lowercase letters,
  225. numbers, and non-alphanumeric characters.
  226. The passphrase can be changed later by using the
  227. .Fl p
  228. option.
  229. .Pp
  230. There is no way to recover a lost passphrase.
  231. If the passphrase is lost or forgotten, a new key must be generated
  232. and the corresponding public key copied to other machines.
  233. .Pp
  234. .Nm
  235. will by default write keys in an OpenSSH-specific format.
  236. This format is preferred as it offers better protection for
  237. keys at rest as well as allowing storage of key comments within
  238. the private key file itself.
  239. The key comment may be useful to help identify the key.
  240. The comment is initialized to
  241. .Dq user@host
  242. when the key is created, but can be changed using the
  243. .Fl c
  244. option.
  245. .Pp
  246. It is still possible for
  247. .Nm
  248. to write the previously-used PEM format private keys using the
  249. .Fl m
  250. flag.
  251. This may be used when generating new keys, and existing new-format
  252. keys may be converted using this option in conjunction with the
  253. .Fl p
  254. (change passphrase) flag.
  255. .Pp
  256. After a key is generated,
  257. .Nm
  258. will ask where the keys
  259. should be placed to be activated.
  260. .Pp
  261. The options are as follows:
  262. .Bl -tag -width Ds
  263. .It Fl A
  264. For each of the key types (rsa, dsa, ecdsa and ed25519)
  265. for which host keys
  266. do not exist, generate the host keys with the default key file path,
  267. an empty passphrase, default bits for the key type, and default comment.
  268. If
  269. .Fl f
  270. has also been specified, its argument is used as a prefix to the
  271. default path for the resulting host key files.
  272. This is used by system administration scripts to generate new host keys.
  273. .It Fl a Ar rounds
  274. When saving a private key, this option specifies the number of KDF
  275. (key derivation function) rounds used.
  276. Higher numbers result in slower passphrase verification and increased
  277. resistance to brute-force password cracking (should the keys be stolen).
  278. The default is 16 rounds.
  279. .It Fl B
  280. Show the bubblebabble digest of specified private or public key file.
  281. .It Fl b Ar bits
  282. Specifies the number of bits in the key to create.
  283. For RSA keys, the minimum size is 1024 bits and the default is 3072 bits.
  284. Generally, 3072 bits is considered sufficient.
  285. DSA keys must be exactly 1024 bits as specified by FIPS 186-2.
  286. For ECDSA keys, the
  287. .Fl b
  288. flag determines the key length by selecting from one of three elliptic
  289. curve sizes: 256, 384 or 521 bits.
  290. Attempting to use bit lengths other than these three values for ECDSA keys
  291. will fail.
  292. ECDSA-SK, Ed25519 and Ed25519-SK keys have a fixed length and the
  293. .Fl b
  294. flag will be ignored.
  295. .It Fl C Ar comment
  296. Provides a new comment.
  297. .It Fl c
  298. Requests changing the comment in the private and public key files.
  299. The program will prompt for the file containing the private keys, for
  300. the passphrase if the key has one, and for the new comment.
  301. .It Fl D Ar pkcs11
  302. Download the public keys provided by the PKCS#11 shared library
  303. .Ar pkcs11 .
  304. When used in combination with
  305. .Fl s ,
  306. this option indicates that a CA key resides in a PKCS#11 token (see the
  307. .Sx CERTIFICATES
  308. section for details).
  309. .It Fl E Ar fingerprint_hash
  310. Specifies the hash algorithm used when displaying key fingerprints.
  311. Valid options are:
  312. .Dq md5
  313. and
  314. .Dq sha256 .
  315. The default is
  316. .Dq sha256 .
  317. .It Fl e
  318. This option will read a private or public OpenSSH key file and
  319. print to stdout a public key in one of the formats specified by the
  320. .Fl m
  321. option.
  322. The default export format is
  323. .Dq RFC4716 .
  324. This option allows exporting OpenSSH keys for use by other programs, including
  325. several commercial SSH implementations.
  326. .It Fl F Ar hostname | [hostname]:port
  327. Search for the specified
  328. .Ar hostname
  329. (with optional port number)
  330. in a
  331. .Pa known_hosts
  332. file, listing any occurrences found.
  333. This option is useful to find hashed host names or addresses and may also be
  334. used in conjunction with the
  335. .Fl H
  336. option to print found keys in a hashed format.
  337. .It Fl f Ar filename
  338. Specifies the filename of the key file.
  339. .It Fl g
  340. Use generic DNS format when printing fingerprint resource records using the
  341. .Fl r
  342. command.
  343. .It Fl H
  344. Hash a
  345. .Pa known_hosts
  346. file.
  347. This replaces all hostnames and addresses with hashed representations
  348. within the specified file; the original content is moved to a file with
  349. a .old suffix.
  350. These hashes may be used normally by
  351. .Nm ssh
  352. and
  353. .Nm sshd ,
  354. but they do not reveal identifying information should the file's contents
  355. be disclosed.
  356. This option will not modify existing hashed hostnames and is therefore safe
  357. to use on files that mix hashed and non-hashed names.
  358. .It Fl h
  359. When signing a key, create a host certificate instead of a user
  360. certificate.
  361. Please see the
  362. .Sx CERTIFICATES
  363. section for details.
  364. .It Fl I Ar certificate_identity
  365. Specify the key identity when signing a public key.
  366. Please see the
  367. .Sx CERTIFICATES
  368. section for details.
  369. .It Fl i
  370. This option will read an unencrypted private (or public) key file
  371. in the format specified by the
  372. .Fl m
  373. option and print an OpenSSH compatible private
  374. (or public) key to stdout.
  375. This option allows importing keys from other software, including several
  376. commercial SSH implementations.
  377. The default import format is
  378. .Dq RFC4716 .
  379. .It Fl K
  380. Download resident keys from a FIDO authenticator.
  381. Public and private key files will be written to the current directory for
  382. each downloaded key.
  383. If multiple FIDO authenticators are attached, keys will be downloaded from
  384. the first touched authenticator.
  385. .It Fl k
  386. Generate a KRL file.
  387. In this mode,
  388. .Nm
  389. will generate a KRL file at the location specified via the
  390. .Fl f
  391. flag that revokes every key or certificate presented on the command line.
  392. Keys/certificates to be revoked may be specified by public key file or
  393. using the format described in the
  394. .Sx KEY REVOCATION LISTS
  395. section.
  396. .It Fl L
  397. Prints the contents of one or more certificates.
  398. .It Fl l
  399. Show fingerprint of specified public key file.
  400. For RSA and DSA keys
  401. .Nm
  402. tries to find the matching public key file and prints its fingerprint.
  403. If combined with
  404. .Fl v ,
  405. a visual ASCII art representation of the key is supplied with the
  406. fingerprint.
  407. .It Fl M Cm generate
  408. Generate candidate Diffie-Hellman Group Exchange (DH-GEX) parameters for
  409. eventual use by the
  410. .Sq diffie-hellman-group-exchange-*
  411. key exchange methods.
  412. The numbers generated by this operation must be further screened before
  413. use.
  414. See the
  415. .Sx MODULI GENERATION
  416. section for more information.
  417. .It Fl M Cm screen
  418. Screen candidate parameters for Diffie-Hellman Group Exchange.
  419. This will accept a list of candidate numbers and test that they are
  420. safe (Sophie Germain) primes with acceptable group generators.
  421. The results of this operation may be added to the
  422. .Pa /etc/moduli
  423. file.
  424. See the
  425. .Sx MODULI GENERATION
  426. section for more information.
  427. .It Fl m Ar key_format
  428. Specify a key format for key generation, the
  429. .Fl i
  430. (import),
  431. .Fl e
  432. (export) conversion options, and the
  433. .Fl p
  434. change passphrase operation.
  435. The latter may be used to convert between OpenSSH private key and PEM
  436. private key formats.
  437. The supported key formats are:
  438. .Dq RFC4716
  439. (RFC 4716/SSH2 public or private key),
  440. .Dq PKCS8
  441. (PKCS8 public or private key)
  442. or
  443. .Dq PEM
  444. (PEM public key).
  445. By default OpenSSH will write newly-generated private keys in its own
  446. format, but when converting public keys for export the default format is
  447. .Dq RFC4716 .
  448. Setting a format of
  449. .Dq PEM
  450. when generating or updating a supported private key type will cause the
  451. key to be stored in the legacy PEM private key format.
  452. .It Fl N Ar new_passphrase
  453. Provides the new passphrase.
  454. .It Fl n Ar principals
  455. Specify one or more principals (user or host names) to be included in
  456. a certificate when signing a key.
  457. Multiple principals may be specified, separated by commas.
  458. Please see the
  459. .Sx CERTIFICATES
  460. section for details.
  461. .It Fl O Ar option
  462. Specify a key/value option.
  463. These are specific to the operation that
  464. .Nm
  465. has been requested to perform.
  466. .Pp
  467. When signing certificates, one of the options listed in the
  468. .Sx CERTIFICATES
  469. section may be specified here.
  470. .Pp
  471. When performing moduli generation or screening, one of the options
  472. listed in the
  473. .Sx MODULI GENERATION
  474. section may be specified.
  475. .Pp
  476. When generating a key that will be hosted on a FIDO authenticator,
  477. this flag may be used to specify key-specific options.
  478. Those supported at present are:
  479. .Bl -tag -width Ds
  480. .It Cm application
  481. Override the default FIDO application/origin string of
  482. .Dq ssh: .
  483. This may be useful when generating host or domain-specific resident keys.
  484. The specified application string must begin with
  485. .Dq ssh: .
  486. .It Cm challenge Ns = Ns Ar path
  487. Specifies a path to a challenge string that will be passed to the
  488. FIDO token during key generation.
  489. The challenge string may be used as part of an out-of-band
  490. protocol for key enrollment
  491. (a random challenge is used by default).
  492. .It Cm device
  493. Explicitly specify a
  494. .Xr fido 4
  495. device to use, rather than letting the token middleware select one.
  496. .It Cm no-touch-required
  497. Indicate that the generated private key should not require touch
  498. events (user presence) when making signatures.
  499. Note that
  500. .Xr sshd 8
  501. will refuse such signatures by default, unless overridden via
  502. an authorized_keys option.
  503. .It Cm resident
  504. Indicate that the key should be stored on the FIDO authenticator itself.
  505. Resident keys may be supported on FIDO2 tokens and typically require that
  506. a PIN be set on the token prior to generation.
  507. Resident keys may be loaded off the token using
  508. .Xr ssh-add 1 .
  509. .It Cm user
  510. A username to be associated with a resident key,
  511. overriding the empty default username.
  512. Specifying a username may be useful when generating multiple resident keys
  513. for the same application name.
  514. .It Cm verify-required
  515. Indicate that this private key should require user verification for
  516. each signature.
  517. Not all FIDO tokens support this option.
  518. Currently PIN authentication is the only supported verification method,
  519. but other methods may be supported in the future.
  520. .It Cm write-attestation Ns = Ns Ar path
  521. May be used at key generation time to record the attestation data
  522. returned from FIDO tokens during key generation.
  523. Please note that this information is potentially sensitive.
  524. By default, this information is discarded.
  525. .El
  526. .Pp
  527. The
  528. .Fl O
  529. option may be specified multiple times.
  530. .It Fl P Ar passphrase
  531. Provides the (old) passphrase.
  532. .It Fl p
  533. Requests changing the passphrase of a private key file instead of
  534. creating a new private key.
  535. The program will prompt for the file
  536. containing the private key, for the old passphrase, and twice for the
  537. new passphrase.
  538. .It Fl Q
  539. Test whether keys have been revoked in a KRL.
  540. If the
  541. .Fl l
  542. option is also specified then the contents of the KRL will be printed.
  543. .It Fl q
  544. Silence
  545. .Nm ssh-keygen .
  546. .It Fl R Ar hostname | [hostname]:port
  547. Removes all keys belonging to the specified
  548. .Ar hostname
  549. (with optional port number)
  550. from a
  551. .Pa known_hosts
  552. file.
  553. This option is useful to delete hashed hosts (see the
  554. .Fl H
  555. option above).
  556. .It Fl r Ar hostname
  557. Print the SSHFP fingerprint resource record named
  558. .Ar hostname
  559. for the specified public key file.
  560. .It Fl s Ar ca_key
  561. Certify (sign) a public key using the specified CA key.
  562. Please see the
  563. .Sx CERTIFICATES
  564. section for details.
  565. .Pp
  566. When generating a KRL,
  567. .Fl s
  568. specifies a path to a CA public key file used to revoke certificates directly
  569. by key ID or serial number.
  570. See the
  571. .Sx KEY REVOCATION LISTS
  572. section for details.
  573. .It Fl t Cm dsa | ecdsa | ecdsa-sk | ed25519 | ed25519-sk | rsa
  574. Specifies the type of key to create.
  575. The possible values are
  576. .Dq dsa ,
  577. .Dq ecdsa ,
  578. .Dq ecdsa-sk ,
  579. .Dq ed25519 ,
  580. .Dq ed25519-sk ,
  581. or
  582. .Dq rsa .
  583. .Pp
  584. This flag may also be used to specify the desired signature type when
  585. signing certificates using an RSA CA key.
  586. The available RSA signature variants are
  587. .Dq ssh-rsa
  588. (SHA1 signatures, not recommended),
  589. .Dq rsa-sha2-256 ,
  590. and
  591. .Dq rsa-sha2-512
  592. (the default).
  593. .It Fl U
  594. When used in combination with
  595. .Fl s ,
  596. this option indicates that a CA key resides in a
  597. .Xr ssh-agent 1 .
  598. See the
  599. .Sx CERTIFICATES
  600. section for more information.
  601. .It Fl u
  602. Update a KRL.
  603. When specified with
  604. .Fl k ,
  605. keys listed via the command line are added to the existing KRL rather than
  606. a new KRL being created.
  607. .It Fl V Ar validity_interval
  608. Specify a validity interval when signing a certificate.
  609. A validity interval may consist of a single time, indicating that the
  610. certificate is valid beginning now and expiring at that time, or may consist
  611. of two times separated by a colon to indicate an explicit time interval.
  612. .Pp
  613. The start time may be specified as the string
  614. .Dq always
  615. to indicate the certificate has no specified start time,
  616. a date in YYYYMMDD format, a time in YYYYMMDDHHMM[SS] format,
  617. a relative time (to the current time) consisting of a minus sign followed by
  618. an interval in the format described in the
  619. TIME FORMATS section of
  620. .Xr sshd_config 5 .
  621. .Pp
  622. The end time may be specified as a YYYYMMDD date, a YYYYMMDDHHMM[SS] time,
  623. a relative time starting with a plus character or the string
  624. .Dq forever
  625. to indicate that the certificate has no expiry date.
  626. .Pp
  627. For example:
  628. .Dq +52w1d
  629. (valid from now to 52 weeks and one day from now),
  630. .Dq -4w:+4w
  631. (valid from four weeks ago to four weeks from now),
  632. .Dq 20100101123000:20110101123000
  633. (valid from 12:30 PM, January 1st, 2010 to 12:30 PM, January 1st, 2011),
  634. .Dq -1d:20110101
  635. (valid from yesterday to midnight, January 1st, 2011),
  636. .Dq -1m:forever
  637. (valid from one minute ago and never expiring).
  638. .It Fl v
  639. Verbose mode.
  640. Causes
  641. .Nm
  642. to print debugging messages about its progress.
  643. This is helpful for debugging moduli generation.
  644. Multiple
  645. .Fl v
  646. options increase the verbosity.
  647. The maximum is 3.
  648. .It Fl w Ar provider
  649. Specifies a path to a library that will be used when creating
  650. FIDO authenticator-hosted keys, overriding the default of using
  651. the internal USB HID support.
  652. .It Fl Y Cm find-principals
  653. Find the principal(s) associated with the public key of a signature,
  654. provided using the
  655. .Fl s
  656. flag in an authorized signers file provided using the
  657. .Fl f
  658. flag.
  659. The format of the allowed signers file is documented in the
  660. .Sx ALLOWED SIGNERS
  661. section below.
  662. If one or more matching principals are found, they are returned on
  663. standard output.
  664. .It Fl Y Cm check-novalidate
  665. Checks that a signature generated using
  666. .Nm
  667. .Fl Y Cm sign
  668. has a valid structure.
  669. This does not validate if a signature comes from an authorized signer.
  670. When testing a signature,
  671. .Nm
  672. accepts a message on standard input and a signature namespace using
  673. .Fl n .
  674. A file containing the corresponding signature must also be supplied using the
  675. .Fl s
  676. flag.
  677. Successful testing of the signature is signalled by
  678. .Nm
  679. returning a zero exit status.
  680. .It Fl Y Cm sign
  681. Cryptographically sign a file or some data using a SSH key.
  682. When signing,
  683. .Nm
  684. accepts zero or more files to sign on the command-line - if no files
  685. are specified then
  686. .Nm
  687. will sign data presented on standard input.
  688. Signatures are written to the path of the input file with
  689. .Dq .sig
  690. appended, or to standard output if the message to be signed was read from
  691. standard input.
  692. .Pp
  693. The key used for signing is specified using the
  694. .Fl f
  695. option and may refer to either a private key, or a public key with the private
  696. half available via
  697. .Xr ssh-agent 1 .
  698. An additional signature namespace, used to prevent signature confusion across
  699. different domains of use (e.g. file signing vs email signing) must be provided
  700. via the
  701. .Fl n
  702. flag.
  703. Namespaces are arbitrary strings, and may include:
  704. .Dq file
  705. for file signing,
  706. .Dq email
  707. for email signing.
  708. For custom uses, it is recommended to use names following a
  709. NAMESPACE@YOUR.DOMAIN pattern to generate unambiguous namespaces.
  710. .It Fl Y Cm verify
  711. Request to verify a signature generated using
  712. .Nm
  713. .Fl Y Cm sign
  714. as described above.
  715. When verifying a signature,
  716. .Nm
  717. accepts a message on standard input and a signature namespace using
  718. .Fl n .
  719. A file containing the corresponding signature must also be supplied using the
  720. .Fl s
  721. flag, along with the identity of the signer using
  722. .Fl I
  723. and a list of allowed signers via the
  724. .Fl f
  725. flag.
  726. The format of the allowed signers file is documented in the
  727. .Sx ALLOWED SIGNERS
  728. section below.
  729. A file containing revoked keys can be passed using the
  730. .Fl r
  731. flag.
  732. The revocation file may be a KRL or a one-per-line list of public keys.
  733. Successful verification by an authorized signer is signalled by
  734. .Nm
  735. returning a zero exit status.
  736. .It Fl y
  737. This option will read a private
  738. OpenSSH format file and print an OpenSSH public key to stdout.
  739. .It Fl Z Ar cipher
  740. Specifies the cipher to use for encryption when writing an OpenSSH-format
  741. private key file.
  742. The list of available ciphers may be obtained using
  743. .Qq ssh -Q cipher .
  744. The default is
  745. .Dq aes256-ctr .
  746. .It Fl z Ar serial_number
  747. Specifies a serial number to be embedded in the certificate to distinguish
  748. this certificate from others from the same CA.
  749. If the
  750. .Ar serial_number
  751. is prefixed with a
  752. .Sq +
  753. character, then the serial number will be incremented for each certificate
  754. signed on a single command-line.
  755. The default serial number is zero.
  756. .Pp
  757. When generating a KRL, the
  758. .Fl z
  759. flag is used to specify a KRL version number.
  760. .El
  761. .Sh MODULI GENERATION
  762. .Nm
  763. may be used to generate groups for the Diffie-Hellman Group Exchange
  764. (DH-GEX) protocol.
  765. Generating these groups is a two-step process: first, candidate
  766. primes are generated using a fast, but memory intensive process.
  767. These candidate primes are then tested for suitability (a CPU-intensive
  768. process).
  769. .Pp
  770. Generation of primes is performed using the
  771. .Fl M Cm generate
  772. option.
  773. The desired length of the primes may be specified by the
  774. .Fl O Cm bits
  775. option.
  776. For example:
  777. .Pp
  778. .Dl # ssh-keygen -M generate -O bits=2048 moduli-2048.candidates
  779. .Pp
  780. By default, the search for primes begins at a random point in the
  781. desired length range.
  782. This may be overridden using the
  783. .Fl O Cm start
  784. option, which specifies a different start point (in hex).
  785. .Pp
  786. Once a set of candidates have been generated, they must be screened for
  787. suitability.
  788. This may be performed using the
  789. .Fl M Cm screen
  790. option.
  791. In this mode
  792. .Nm
  793. will read candidates from standard input (or a file specified using the
  794. .Fl f
  795. option).
  796. For example:
  797. .Pp
  798. .Dl # ssh-keygen -M screen -f moduli-2048.candidates moduli-2048
  799. .Pp
  800. By default, each candidate will be subjected to 100 primality tests.
  801. This may be overridden using the
  802. .Fl O Cm prime-tests
  803. option.
  804. The DH generator value will be chosen automatically for the
  805. prime under consideration.
  806. If a specific generator is desired, it may be requested using the
  807. .Fl O Cm generator
  808. option.
  809. Valid generator values are 2, 3, and 5.
  810. .Pp
  811. Screened DH groups may be installed in
  812. .Pa /etc/ssh/moduli .
  813. It is important that this file contains moduli of a range of bit lengths and
  814. that both ends of a connection share common moduli.
  815. .Pp
  816. A number of options are available for moduli generation and screening via the
  817. .Fl O
  818. flag:
  819. .Bl -tag -width Ds
  820. .It Ic lines Ns = Ns Ar number
  821. Exit after screening the specified number of lines while performing DH
  822. candidate screening.
  823. .It Ic start-line Ns = Ns Ar line-number
  824. Start screening at the specified line number while performing DH candidate
  825. screening.
  826. .It Ic checkpoint Ns = Ns Ar filename
  827. Write the last line processed to the specified file while performing DH
  828. candidate screening.
  829. This will be used to skip lines in the input file that have already been
  830. processed if the job is restarted.
  831. .It Ic memory Ns = Ns Ar mbytes
  832. Specify the amount of memory to use (in megabytes) when generating
  833. candidate moduli for DH-GEX.
  834. .It Ic start Ns = Ns Ar hex-value
  835. Specify start point (in hex) when generating candidate moduli for DH-GEX.
  836. .It Ic generator Ns = Ns Ar value
  837. Specify desired generator (in decimal) when testing candidate moduli for DH-GEX.
  838. .El
  839. .Sh CERTIFICATES
  840. .Nm
  841. supports signing of keys to produce certificates that may be used for
  842. user or host authentication.
  843. Certificates consist of a public key, some identity information, zero or
  844. more principal (user or host) names and a set of options that
  845. are signed by a Certification Authority (CA) key.
  846. Clients or servers may then trust only the CA key and verify its signature
  847. on a certificate rather than trusting many user/host keys.
  848. Note that OpenSSH certificates are a different, and much simpler, format to
  849. the X.509 certificates used in
  850. .Xr ssl 8 .
  851. .Pp
  852. .Nm
  853. supports two types of certificates: user and host.
  854. User certificates authenticate users to servers, whereas host certificates
  855. authenticate server hosts to users.
  856. To generate a user certificate:
  857. .Pp
  858. .Dl $ ssh-keygen -s /path/to/ca_key -I key_id /path/to/user_key.pub
  859. .Pp
  860. The resultant certificate will be placed in
  861. .Pa /path/to/user_key-cert.pub .
  862. A host certificate requires the
  863. .Fl h
  864. option:
  865. .Pp
  866. .Dl $ ssh-keygen -s /path/to/ca_key -I key_id -h /path/to/host_key.pub
  867. .Pp
  868. The host certificate will be output to
  869. .Pa /path/to/host_key-cert.pub .
  870. .Pp
  871. It is possible to sign using a CA key stored in a PKCS#11 token by
  872. providing the token library using
  873. .Fl D
  874. and identifying the CA key by providing its public half as an argument
  875. to
  876. .Fl s :
  877. .Pp
  878. .Dl $ ssh-keygen -s ca_key.pub -D libpkcs11.so -I key_id user_key.pub
  879. .Pp
  880. Similarly, it is possible for the CA key to be hosted in a
  881. .Xr ssh-agent 1 .
  882. This is indicated by the
  883. .Fl U
  884. flag and, again, the CA key must be identified by its public half.
  885. .Pp
  886. .Dl $ ssh-keygen -Us ca_key.pub -I key_id user_key.pub
  887. .Pp
  888. In all cases,
  889. .Ar key_id
  890. is a "key identifier" that is logged by the server when the certificate
  891. is used for authentication.
  892. .Pp
  893. Certificates may be limited to be valid for a set of principal (user/host)
  894. names.
  895. By default, generated certificates are valid for all users or hosts.
  896. To generate a certificate for a specified set of principals:
  897. .Pp
  898. .Dl $ ssh-keygen -s ca_key -I key_id -n user1,user2 user_key.pub
  899. .Dl "$ ssh-keygen -s ca_key -I key_id -h -n host.domain host_key.pub"
  900. .Pp
  901. Additional limitations on the validity and use of user certificates may
  902. be specified through certificate options.
  903. A certificate option may disable features of the SSH session, may be
  904. valid only when presented from particular source addresses or may
  905. force the use of a specific command.
  906. .Pp
  907. The options that are valid for user certificates are:
  908. .Pp
  909. .Bl -tag -width Ds -compact
  910. .It Ic clear
  911. Clear all enabled permissions.
  912. This is useful for clearing the default set of permissions so permissions may
  913. be added individually.
  914. .Pp
  915. .It Ic critical : Ns Ar name Ns Op Ns = Ns Ar contents
  916. .It Ic extension : Ns Ar name Ns Op Ns = Ns Ar contents
  917. Includes an arbitrary certificate critical option or extension.
  918. The specified
  919. .Ar name
  920. should include a domain suffix, e.g.\&
  921. .Dq name@example.com .
  922. If
  923. .Ar contents
  924. is specified then it is included as the contents of the extension/option
  925. encoded as a string, otherwise the extension/option is created with no
  926. contents (usually indicating a flag).
  927. Extensions may be ignored by a client or server that does not recognise them,
  928. whereas unknown critical options will cause the certificate to be refused.
  929. .Pp
  930. .It Ic force-command Ns = Ns Ar command
  931. Forces the execution of
  932. .Ar command
  933. instead of any shell or command specified by the user when
  934. the certificate is used for authentication.
  935. .Pp
  936. .It Ic no-agent-forwarding
  937. Disable
  938. .Xr ssh-agent 1
  939. forwarding (permitted by default).
  940. .Pp
  941. .It Ic no-port-forwarding
  942. Disable port forwarding (permitted by default).
  943. .Pp
  944. .It Ic no-pty
  945. Disable PTY allocation (permitted by default).
  946. .Pp
  947. .It Ic no-user-rc
  948. Disable execution of
  949. .Pa ~/.ssh/rc
  950. by
  951. .Xr sshd 8
  952. (permitted by default).
  953. .Pp
  954. .It Ic no-x11-forwarding
  955. Disable X11 forwarding (permitted by default).
  956. .Pp
  957. .It Ic permit-agent-forwarding
  958. Allows
  959. .Xr ssh-agent 1
  960. forwarding.
  961. .Pp
  962. .It Ic permit-port-forwarding
  963. Allows port forwarding.
  964. .Pp
  965. .It Ic permit-pty
  966. Allows PTY allocation.
  967. .Pp
  968. .It Ic permit-user-rc
  969. Allows execution of
  970. .Pa ~/.ssh/rc
  971. by
  972. .Xr sshd 8 .
  973. .Pp
  974. .It Ic permit-X11-forwarding
  975. Allows X11 forwarding.
  976. .Pp
  977. .It Ic no-touch-required
  978. Do not require signatures made using this key include demonstration
  979. of user presence (e.g. by having the user touch the authenticator).
  980. This option only makes sense for the FIDO authenticator algorithms
  981. .Cm ecdsa-sk
  982. and
  983. .Cm ed25519-sk .
  984. .Pp
  985. .It Ic source-address Ns = Ns Ar address_list
  986. Restrict the source addresses from which the certificate is considered valid.
  987. The
  988. .Ar address_list
  989. is a comma-separated list of one or more address/netmask pairs in CIDR
  990. format.
  991. .Pp
  992. .It Ic verify-required
  993. Require signatures made using this key indicate that the user was first
  994. verified.
  995. This option only makes sense for the FIDO authenticator algorithms
  996. .Cm ecdsa-sk
  997. and
  998. .Cm ed25519-sk .
  999. Currently PIN authentication is the only supported verification method,
  1000. but other methods may be supported in the future.
  1001. .El
  1002. .Pp
  1003. At present, no standard options are valid for host keys.
  1004. .Pp
  1005. Finally, certificates may be defined with a validity lifetime.
  1006. The
  1007. .Fl V
  1008. option allows specification of certificate start and end times.
  1009. A certificate that is presented at a time outside this range will not be
  1010. considered valid.
  1011. By default, certificates are valid from the
  1012. .Ux
  1013. Epoch to the distant future.
  1014. .Pp
  1015. For certificates to be used for user or host authentication, the CA
  1016. public key must be trusted by
  1017. .Xr sshd 8
  1018. or
  1019. .Xr ssh 1 .
  1020. Please refer to those manual pages for details.
  1021. .Sh KEY REVOCATION LISTS
  1022. .Nm
  1023. is able to manage OpenSSH format Key Revocation Lists (KRLs).
  1024. These binary files specify keys or certificates to be revoked using a
  1025. compact format, taking as little as one bit per certificate if they are being
  1026. revoked by serial number.
  1027. .Pp
  1028. KRLs may be generated using the
  1029. .Fl k
  1030. flag.
  1031. This option reads one or more files from the command line and generates a new
  1032. KRL.
  1033. The files may either contain a KRL specification (see below) or public keys,
  1034. listed one per line.
  1035. Plain public keys are revoked by listing their hash or contents in the KRL and
  1036. certificates revoked by serial number or key ID (if the serial is zero or
  1037. not available).
  1038. .Pp
  1039. Revoking keys using a KRL specification offers explicit control over the
  1040. types of record used to revoke keys and may be used to directly revoke
  1041. certificates by serial number or key ID without having the complete original
  1042. certificate on hand.
  1043. A KRL specification consists of lines containing one of the following directives
  1044. followed by a colon and some directive-specific information.
  1045. .Bl -tag -width Ds
  1046. .It Cm serial : Ar serial_number Ns Op - Ns Ar serial_number
  1047. Revokes a certificate with the specified serial number.
  1048. Serial numbers are 64-bit values, not including zero and may be expressed
  1049. in decimal, hex or octal.
  1050. If two serial numbers are specified separated by a hyphen, then the range
  1051. of serial numbers including and between each is revoked.
  1052. The CA key must have been specified on the
  1053. .Nm
  1054. command line using the
  1055. .Fl s
  1056. option.
  1057. .It Cm id : Ar key_id
  1058. Revokes a certificate with the specified key ID string.
  1059. The CA key must have been specified on the
  1060. .Nm
  1061. command line using the
  1062. .Fl s
  1063. option.
  1064. .It Cm key : Ar public_key
  1065. Revokes the specified key.
  1066. If a certificate is listed, then it is revoked as a plain public key.
  1067. .It Cm sha1 : Ar public_key
  1068. Revokes the specified key by including its SHA1 hash in the KRL.
  1069. .It Cm sha256 : Ar public_key
  1070. Revokes the specified key by including its SHA256 hash in the KRL.
  1071. KRLs that revoke keys by SHA256 hash are not supported by OpenSSH versions
  1072. prior to 7.9.
  1073. .It Cm hash : Ar fingerprint
  1074. Revokes a key using a fingerprint hash, as obtained from a
  1075. .Xr sshd 8
  1076. authentication log message or the
  1077. .Nm
  1078. .Fl l
  1079. flag.
  1080. Only SHA256 fingerprints are supported here and resultant KRLs are
  1081. not supported by OpenSSH versions prior to 7.9.
  1082. .El
  1083. .Pp
  1084. KRLs may be updated using the
  1085. .Fl u
  1086. flag in addition to
  1087. .Fl k .
  1088. When this option is specified, keys listed via the command line are merged into
  1089. the KRL, adding to those already there.
  1090. .Pp
  1091. It is also possible, given a KRL, to test whether it revokes a particular key
  1092. (or keys).
  1093. The
  1094. .Fl Q
  1095. flag will query an existing KRL, testing each key specified on the command line.
  1096. If any key listed on the command line has been revoked (or an error encountered)
  1097. then
  1098. .Nm
  1099. will exit with a non-zero exit status.
  1100. A zero exit status will only be returned if no key was revoked.
  1101. .Sh ALLOWED SIGNERS
  1102. When verifying signatures,
  1103. .Nm
  1104. uses a simple list of identities and keys to determine whether a signature
  1105. comes from an authorized source.
  1106. This "allowed signers" file uses a format patterned after the
  1107. AUTHORIZED_KEYS FILE FORMAT described in
  1108. .Xr sshd 8 .
  1109. Each line of the file contains the following space-separated fields:
  1110. principals, options, keytype, base64-encoded key.
  1111. Empty lines and lines starting with a
  1112. .Ql #
  1113. are ignored as comments.
  1114. .Pp
  1115. The principals field is a pattern-list (see PATTERNS in
  1116. .Xr ssh_config 5 )
  1117. consisting of one or more comma-separated USER@DOMAIN identity patterns
  1118. that are accepted for signing.
  1119. When verifying, the identity presented via the
  1120. .Fl I
  1121. option must match a principals pattern in order for the corresponding key to be
  1122. considered acceptable for verification.
  1123. .Pp
  1124. The options (if present) consist of comma-separated option specifications.
  1125. No spaces are permitted, except within double quotes.
  1126. The following option specifications are supported (note that option keywords
  1127. are case-insensitive):
  1128. .Bl -tag -width Ds
  1129. .It Cm cert-authority
  1130. Indicates that this key is accepted as a certificate authority (CA) and
  1131. that certificates signed by this CA may be accepted for verification.
  1132. .It Cm namespaces="namespace-list"
  1133. Specifies a pattern-list of namespaces that are accepted for this key.
  1134. If this option is present, the signature namespace embedded in the
  1135. signature object and presented on the verification command-line must
  1136. match the specified list before the key will be considered acceptable.
  1137. .El
  1138. .Pp
  1139. When verifying signatures made by certificates, the expected principal
  1140. name must match both the principals pattern in the allowed signers file and
  1141. the principals embedded in the certificate itself.
  1142. .Pp
  1143. An example allowed signers file:
  1144. .Bd -literal -offset 3n
  1145. # Comments allowed at start of line
  1146. user1@example.com,user2@example.com ssh-rsa AAAAX1...
  1147. # A certificate authority, trusted for all principals in a domain.
  1148. *@example.com cert-authority ssh-ed25519 AAAB4...
  1149. # A key that is accepted only for file signing.
  1150. user2@example.com namespaces="file" ssh-ed25519 AAA41...
  1151. .Ed
  1152. .Sh ENVIRONMENT
  1153. .Bl -tag -width Ds
  1154. .It Ev SSH_SK_PROVIDER
  1155. Specifies a path to a library that will be used when loading any
  1156. FIDO authenticator-hosted keys, overriding the default of using
  1157. the built-in USB HID support.
  1158. .El
  1159. .Sh FILES
  1160. .Bl -tag -width Ds -compact
  1161. .It Pa ~/.ssh/id_dsa
  1162. .It Pa ~/.ssh/id_ecdsa
  1163. .It Pa ~/.ssh/id_ecdsa_sk
  1164. .It Pa ~/.ssh/id_ed25519
  1165. .It Pa ~/.ssh/id_ed25519_sk
  1166. .It Pa ~/.ssh/id_rsa
  1167. Contains the DSA, ECDSA, authenticator-hosted ECDSA, Ed25519,
  1168. authenticator-hosted Ed25519 or RSA authentication identity of the user.
  1169. This file should not be readable by anyone but the user.
  1170. It is possible to
  1171. specify a passphrase when generating the key; that passphrase will be
  1172. used to encrypt the private part of this file using 128-bit AES.
  1173. This file is not automatically accessed by
  1174. .Nm
  1175. but it is offered as the default file for the private key.
  1176. .Xr ssh 1
  1177. will read this file when a login attempt is made.
  1178. .Pp
  1179. .It Pa ~/.ssh/id_dsa.pub
  1180. .It Pa ~/.ssh/id_ecdsa.pub
  1181. .It Pa ~/.ssh/id_ecdsa_sk.pub
  1182. .It Pa ~/.ssh/id_ed25519.pub
  1183. .It Pa ~/.ssh/id_ed25519_sk.pub
  1184. .It Pa ~/.ssh/id_rsa.pub
  1185. Contains the DSA, ECDSA, authenticator-hosted ECDSA, Ed25519,
  1186. authenticator-hosted Ed25519 or RSA public key for authentication.
  1187. The contents of this file should be added to
  1188. .Pa ~/.ssh/authorized_keys
  1189. on all machines
  1190. where the user wishes to log in using public key authentication.
  1191. There is no need to keep the contents of this file secret.
  1192. .Pp
  1193. .It Pa /etc/ssh/moduli
  1194. Contains Diffie-Hellman groups used for DH-GEX.
  1195. The file format is described in
  1196. .Xr moduli 5 .
  1197. .El
  1198. .Sh SEE ALSO
  1199. .Xr ssh 1 ,
  1200. .Xr ssh-add 1 ,
  1201. .Xr ssh-agent 1 ,
  1202. .Xr moduli 5 ,
  1203. .Xr sshd 8
  1204. .Rs
  1205. .%R RFC 4716
  1206. .%T "The Secure Shell (SSH) Public Key File Format"
  1207. .%D 2006
  1208. .Re
  1209. .Sh AUTHORS
  1210. OpenSSH is a derivative of the original and free
  1211. ssh 1.2.12 release by Tatu Ylonen.
  1212. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
  1213. Theo de Raadt and Dug Song
  1214. removed many bugs, re-added newer features and
  1215. created OpenSSH.
  1216. Markus Friedl contributed the support for SSH
  1217. protocol versions 1.5 and 2.0.