sshd_config.5 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939
  1. .\"
  2. .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
  3. .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  4. .\" All rights reserved
  5. .\"
  6. .\" As far as I am concerned, the code I have written for this software
  7. .\" can be used freely for any purpose. Any derived versions of this
  8. .\" software must be clearly marked as such, and if the derived work is
  9. .\" incompatible with the protocol description in the RFC file, it must be
  10. .\" called by a name other than "ssh" or "Secure Shell".
  11. .\"
  12. .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
  13. .\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
  14. .\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
  15. .\"
  16. .\" Redistribution and use in source and binary forms, with or without
  17. .\" modification, are permitted provided that the following conditions
  18. .\" are met:
  19. .\" 1. Redistributions of source code must retain the above copyright
  20. .\" notice, this list of conditions and the following disclaimer.
  21. .\" 2. Redistributions in binary form must reproduce the above copyright
  22. .\" notice, this list of conditions and the following disclaimer in the
  23. .\" documentation and/or other materials provided with the distribution.
  24. .\"
  25. .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  26. .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  27. .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  28. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  29. .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  30. .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  31. .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  32. .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  33. .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  34. .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. .\"
  36. .\" $OpenBSD: sshd_config.5,v 1.316 2020/10/03 04:15:06 djm Exp $
  37. .Dd $Mdocdate: October 3 2020 $
  38. .Dt SSHD_CONFIG 5
  39. .Os
  40. .Sh NAME
  41. .Nm sshd_config
  42. .Nd OpenSSH daemon configuration file
  43. .Sh DESCRIPTION
  44. .Xr sshd 8
  45. reads configuration data from
  46. .Pa /etc/ssh/sshd_config
  47. (or the file specified with
  48. .Fl f
  49. on the command line).
  50. The file contains keyword-argument pairs, one per line.
  51. For each keyword, the first obtained value will be used.
  52. Lines starting with
  53. .Ql #
  54. and empty lines are interpreted as comments.
  55. Arguments may optionally be enclosed in double quotes
  56. .Pq \&"
  57. in order to represent arguments containing spaces.
  58. .Pp
  59. The possible
  60. keywords and their meanings are as follows (note that
  61. keywords are case-insensitive and arguments are case-sensitive):
  62. .Bl -tag -width Ds
  63. .It Cm AcceptEnv
  64. Specifies what environment variables sent by the client will be copied into
  65. the session's
  66. .Xr environ 7 .
  67. See
  68. .Cm SendEnv
  69. and
  70. .Cm SetEnv
  71. in
  72. .Xr ssh_config 5
  73. for how to configure the client.
  74. The
  75. .Ev TERM
  76. environment variable is always accepted whenever the client
  77. requests a pseudo-terminal as it is required by the protocol.
  78. Variables are specified by name, which may contain the wildcard characters
  79. .Ql *
  80. and
  81. .Ql \&? .
  82. Multiple environment variables may be separated by whitespace or spread
  83. across multiple
  84. .Cm AcceptEnv
  85. directives.
  86. Be warned that some environment variables could be used to bypass restricted
  87. user environments.
  88. For this reason, care should be taken in the use of this directive.
  89. The default is not to accept any environment variables.
  90. .It Cm AddressFamily
  91. Specifies which address family should be used by
  92. .Xr sshd 8 .
  93. Valid arguments are
  94. .Cm any
  95. (the default),
  96. .Cm inet
  97. (use IPv4 only), or
  98. .Cm inet6
  99. (use IPv6 only).
  100. .It Cm AllowAgentForwarding
  101. Specifies whether
  102. .Xr ssh-agent 1
  103. forwarding is permitted.
  104. The default is
  105. .Cm yes .
  106. Note that disabling agent forwarding does not improve security
  107. unless users are also denied shell access, as they can always install
  108. their own forwarders.
  109. .It Cm AllowGroups
  110. This keyword can be followed by a list of group name patterns, separated
  111. by spaces.
  112. If specified, login is allowed only for users whose primary
  113. group or supplementary group list matches one of the patterns.
  114. Only group names are valid; a numerical group ID is not recognized.
  115. By default, login is allowed for all groups.
  116. The allow/deny groups directives are processed in the following order:
  117. .Cm DenyGroups ,
  118. .Cm AllowGroups .
  119. .Pp
  120. See PATTERNS in
  121. .Xr ssh_config 5
  122. for more information on patterns.
  123. .It Cm AllowStreamLocalForwarding
  124. Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
  125. The available options are
  126. .Cm yes
  127. (the default)
  128. or
  129. .Cm all
  130. to allow StreamLocal forwarding,
  131. .Cm no
  132. to prevent all StreamLocal forwarding,
  133. .Cm local
  134. to allow local (from the perspective of
  135. .Xr ssh 1 )
  136. forwarding only or
  137. .Cm remote
  138. to allow remote forwarding only.
  139. Note that disabling StreamLocal forwarding does not improve security unless
  140. users are also denied shell access, as they can always install their
  141. own forwarders.
  142. .It Cm AllowTcpForwarding
  143. Specifies whether TCP forwarding is permitted.
  144. The available options are
  145. .Cm yes
  146. (the default)
  147. or
  148. .Cm all
  149. to allow TCP forwarding,
  150. .Cm no
  151. to prevent all TCP forwarding,
  152. .Cm local
  153. to allow local (from the perspective of
  154. .Xr ssh 1 )
  155. forwarding only or
  156. .Cm remote
  157. to allow remote forwarding only.
  158. Note that disabling TCP forwarding does not improve security unless
  159. users are also denied shell access, as they can always install their
  160. own forwarders.
  161. .It Cm AllowUsers
  162. This keyword can be followed by a list of user name patterns, separated
  163. by spaces.
  164. If specified, login is allowed only for user names that
  165. match one of the patterns.
  166. Only user names are valid; a numerical user ID is not recognized.
  167. By default, login is allowed for all users.
  168. If the pattern takes the form USER@HOST then USER and HOST
  169. are separately checked, restricting logins to particular
  170. users from particular hosts.
  171. HOST criteria may additionally contain addresses to match in CIDR
  172. address/masklen format.
  173. The allow/deny users directives are processed in the following order:
  174. .Cm DenyUsers ,
  175. .Cm AllowUsers .
  176. .Pp
  177. See PATTERNS in
  178. .Xr ssh_config 5
  179. for more information on patterns.
  180. .It Cm AuthenticationMethods
  181. Specifies the authentication methods that must be successfully completed
  182. for a user to be granted access.
  183. This option must be followed by one or more lists of comma-separated
  184. authentication method names, or by the single string
  185. .Cm any
  186. to indicate the default behaviour of accepting any single authentication
  187. method.
  188. If the default is overridden, then successful authentication requires
  189. completion of every method in at least one of these lists.
  190. .Pp
  191. For example,
  192. .Qq publickey,password publickey,keyboard-interactive
  193. would require the user to complete public key authentication, followed by
  194. either password or keyboard interactive authentication.
  195. Only methods that are next in one or more lists are offered at each stage,
  196. so for this example it would not be possible to attempt password or
  197. keyboard-interactive authentication before public key.
  198. .Pp
  199. For keyboard interactive authentication it is also possible to
  200. restrict authentication to a specific device by appending a
  201. colon followed by the device identifier
  202. .Cm bsdauth
  203. or
  204. .Cm pam .
  205. depending on the server configuration.
  206. For example,
  207. .Qq keyboard-interactive:bsdauth
  208. would restrict keyboard interactive authentication to the
  209. .Cm bsdauth
  210. device.
  211. .Pp
  212. If the publickey method is listed more than once,
  213. .Xr sshd 8
  214. verifies that keys that have been used successfully are not reused for
  215. subsequent authentications.
  216. For example,
  217. .Qq publickey,publickey
  218. requires successful authentication using two different public keys.
  219. .Pp
  220. Note that each authentication method listed should also be explicitly enabled
  221. in the configuration.
  222. .Pp
  223. The available authentication methods are:
  224. .Qq gssapi-with-mic ,
  225. .Qq hostbased ,
  226. .Qq keyboard-interactive ,
  227. .Qq none
  228. (used for access to password-less accounts when
  229. .Cm PermitEmptyPasswords
  230. is enabled),
  231. .Qq password
  232. and
  233. .Qq publickey .
  234. .It Cm AuthorizedKeysCommand
  235. Specifies a program to be used to look up the user's public keys.
  236. The program must be owned by root, not writable by group or others and
  237. specified by an absolute path.
  238. Arguments to
  239. .Cm AuthorizedKeysCommand
  240. accept the tokens described in the
  241. .Sx TOKENS
  242. section.
  243. If no arguments are specified then the username of the target user is used.
  244. .Pp
  245. The program should produce on standard output zero or
  246. more lines of authorized_keys output (see
  247. .Sx AUTHORIZED_KEYS
  248. in
  249. .Xr sshd 8 ) .
  250. .Cm AuthorizedKeysCommand
  251. is tried after the usual
  252. .Cm AuthorizedKeysFile
  253. files and will not be executed if a matching key is found there.
  254. By default, no
  255. .Cm AuthorizedKeysCommand
  256. is run.
  257. .It Cm AuthorizedKeysCommandUser
  258. Specifies the user under whose account the
  259. .Cm AuthorizedKeysCommand
  260. is run.
  261. It is recommended to use a dedicated user that has no other role on the host
  262. than running authorized keys commands.
  263. If
  264. .Cm AuthorizedKeysCommand
  265. is specified but
  266. .Cm AuthorizedKeysCommandUser
  267. is not, then
  268. .Xr sshd 8
  269. will refuse to start.
  270. .It Cm AuthorizedKeysFile
  271. Specifies the file that contains the public keys used for user authentication.
  272. The format is described in the AUTHORIZED_KEYS FILE FORMAT section of
  273. .Xr sshd 8 .
  274. Arguments to
  275. .Cm AuthorizedKeysFile
  276. accept the tokens described in the
  277. .Sx TOKENS
  278. section.
  279. After expansion,
  280. .Cm AuthorizedKeysFile
  281. is taken to be an absolute path or one relative to the user's home
  282. directory.
  283. Multiple files may be listed, separated by whitespace.
  284. Alternately this option may be set to
  285. .Cm none
  286. to skip checking for user keys in files.
  287. The default is
  288. .Qq .ssh/authorized_keys .ssh/authorized_keys2 .
  289. .It Cm AuthorizedPrincipalsCommand
  290. Specifies a program to be used to generate the list of allowed
  291. certificate principals as per
  292. .Cm AuthorizedPrincipalsFile .
  293. The program must be owned by root, not writable by group or others and
  294. specified by an absolute path.
  295. Arguments to
  296. .Cm AuthorizedPrincipalsCommand
  297. accept the tokens described in the
  298. .Sx TOKENS
  299. section.
  300. If no arguments are specified then the username of the target user is used.
  301. .Pp
  302. The program should produce on standard output zero or
  303. more lines of
  304. .Cm AuthorizedPrincipalsFile
  305. output.
  306. If either
  307. .Cm AuthorizedPrincipalsCommand
  308. or
  309. .Cm AuthorizedPrincipalsFile
  310. is specified, then certificates offered by the client for authentication
  311. must contain a principal that is listed.
  312. By default, no
  313. .Cm AuthorizedPrincipalsCommand
  314. is run.
  315. .It Cm AuthorizedPrincipalsCommandUser
  316. Specifies the user under whose account the
  317. .Cm AuthorizedPrincipalsCommand
  318. is run.
  319. It is recommended to use a dedicated user that has no other role on the host
  320. than running authorized principals commands.
  321. If
  322. .Cm AuthorizedPrincipalsCommand
  323. is specified but
  324. .Cm AuthorizedPrincipalsCommandUser
  325. is not, then
  326. .Xr sshd 8
  327. will refuse to start.
  328. .It Cm AuthorizedPrincipalsFile
  329. Specifies a file that lists principal names that are accepted for
  330. certificate authentication.
  331. When using certificates signed by a key listed in
  332. .Cm TrustedUserCAKeys ,
  333. this file lists names, one of which must appear in the certificate for it
  334. to be accepted for authentication.
  335. Names are listed one per line preceded by key options (as described in
  336. .Sx AUTHORIZED_KEYS FILE FORMAT
  337. in
  338. .Xr sshd 8 ) .
  339. Empty lines and comments starting with
  340. .Ql #
  341. are ignored.
  342. .Pp
  343. Arguments to
  344. .Cm AuthorizedPrincipalsFile
  345. accept the tokens described in the
  346. .Sx TOKENS
  347. section.
  348. After expansion,
  349. .Cm AuthorizedPrincipalsFile
  350. is taken to be an absolute path or one relative to the user's home directory.
  351. The default is
  352. .Cm none ,
  353. i.e. not to use a principals file \(en in this case, the username
  354. of the user must appear in a certificate's principals list for it to be
  355. accepted.
  356. .Pp
  357. Note that
  358. .Cm AuthorizedPrincipalsFile
  359. is only used when authentication proceeds using a CA listed in
  360. .Cm TrustedUserCAKeys
  361. and is not consulted for certification authorities trusted via
  362. .Pa ~/.ssh/authorized_keys ,
  363. though the
  364. .Cm principals=
  365. key option offers a similar facility (see
  366. .Xr sshd 8
  367. for details).
  368. .It Cm Banner
  369. The contents of the specified file are sent to the remote user before
  370. authentication is allowed.
  371. If the argument is
  372. .Cm none
  373. then no banner is displayed.
  374. By default, no banner is displayed.
  375. .It Cm CASignatureAlgorithms
  376. Specifies which algorithms are allowed for signing of certificates
  377. by certificate authorities (CAs).
  378. The default is:
  379. .Bd -literal -offset indent
  380. ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,
  381. ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa
  382. .Ed
  383. .Pp
  384. Certificates signed using other algorithms will not be accepted for
  385. public key or host-based authentication.
  386. .It Cm ChallengeResponseAuthentication
  387. Specifies whether challenge-response authentication is allowed (e.g. via
  388. PAM).
  389. The default is
  390. .Cm yes .
  391. .It Cm ChrootDirectory
  392. Specifies the pathname of a directory to
  393. .Xr chroot 2
  394. to after authentication.
  395. At session startup
  396. .Xr sshd 8
  397. checks that all components of the pathname are root-owned directories
  398. which are not writable by any other user or group.
  399. After the chroot,
  400. .Xr sshd 8
  401. changes the working directory to the user's home directory.
  402. Arguments to
  403. .Cm ChrootDirectory
  404. accept the tokens described in the
  405. .Sx TOKENS
  406. section.
  407. .Pp
  408. The
  409. .Cm ChrootDirectory
  410. must contain the necessary files and directories to support the
  411. user's session.
  412. For an interactive session this requires at least a shell, typically
  413. .Xr sh 1 ,
  414. and basic
  415. .Pa /dev
  416. nodes such as
  417. .Xr null 4 ,
  418. .Xr zero 4 ,
  419. .Xr stdin 4 ,
  420. .Xr stdout 4 ,
  421. .Xr stderr 4 ,
  422. and
  423. .Xr tty 4
  424. devices.
  425. For file transfer sessions using SFTP
  426. no additional configuration of the environment is necessary if the in-process
  427. sftp-server is used,
  428. though sessions which use logging may require
  429. .Pa /dev/log
  430. inside the chroot directory on some operating systems (see
  431. .Xr sftp-server 8
  432. for details).
  433. .Pp
  434. For safety, it is very important that the directory hierarchy be
  435. prevented from modification by other processes on the system (especially
  436. those outside the jail).
  437. Misconfiguration can lead to unsafe environments which
  438. .Xr sshd 8
  439. cannot detect.
  440. .Pp
  441. The default is
  442. .Cm none ,
  443. indicating not to
  444. .Xr chroot 2 .
  445. .It Cm Ciphers
  446. Specifies the ciphers allowed.
  447. Multiple ciphers must be comma-separated.
  448. If the specified list begins with a
  449. .Sq +
  450. character, then the specified ciphers will be appended to the default set
  451. instead of replacing them.
  452. If the specified list begins with a
  453. .Sq -
  454. character, then the specified ciphers (including wildcards) will be removed
  455. from the default set instead of replacing them.
  456. If the specified list begins with a
  457. .Sq ^
  458. character, then the specified ciphers will be placed at the head of the
  459. default set.
  460. .Pp
  461. The supported ciphers are:
  462. .Pp
  463. .Bl -item -compact -offset indent
  464. .It
  465. 3des-cbc
  466. .It
  467. aes128-cbc
  468. .It
  469. aes192-cbc
  470. .It
  471. aes256-cbc
  472. .It
  473. aes128-ctr
  474. .It
  475. aes192-ctr
  476. .It
  477. aes256-ctr
  478. .It
  479. aes128-gcm@openssh.com
  480. .It
  481. aes256-gcm@openssh.com
  482. .It
  483. chacha20-poly1305@openssh.com
  484. .El
  485. .Pp
  486. The default is:
  487. .Bd -literal -offset indent
  488. chacha20-poly1305@openssh.com,
  489. aes128-ctr,aes192-ctr,aes256-ctr,
  490. aes128-gcm@openssh.com,aes256-gcm@openssh.com
  491. .Ed
  492. .Pp
  493. The list of available ciphers may also be obtained using
  494. .Qq ssh -Q cipher .
  495. .It Cm ClientAliveCountMax
  496. Sets the number of client alive messages which may be sent without
  497. .Xr sshd 8
  498. receiving any messages back from the client.
  499. If this threshold is reached while client alive messages are being sent,
  500. sshd will disconnect the client, terminating the session.
  501. It is important to note that the use of client alive messages is very
  502. different from
  503. .Cm TCPKeepAlive .
  504. The client alive messages are sent through the encrypted channel
  505. and therefore will not be spoofable.
  506. The TCP keepalive option enabled by
  507. .Cm TCPKeepAlive
  508. is spoofable.
  509. The client alive mechanism is valuable when the client or
  510. server depend on knowing when a connection has become unresponsive.
  511. .Pp
  512. The default value is 3.
  513. If
  514. .Cm ClientAliveInterval
  515. is set to 15, and
  516. .Cm ClientAliveCountMax
  517. is left at the default, unresponsive SSH clients
  518. will be disconnected after approximately 45 seconds.
  519. Setting a zero
  520. .Cm ClientAliveCountMax
  521. disables connection termination.
  522. .It Cm ClientAliveInterval
  523. Sets a timeout interval in seconds after which if no data has been received
  524. from the client,
  525. .Xr sshd 8
  526. will send a message through the encrypted
  527. channel to request a response from the client.
  528. The default
  529. is 0, indicating that these messages will not be sent to the client.
  530. .It Cm Compression
  531. Specifies whether compression is enabled after
  532. the user has authenticated successfully.
  533. The argument must be
  534. .Cm yes ,
  535. .Cm delayed
  536. (a legacy synonym for
  537. .Cm yes )
  538. or
  539. .Cm no .
  540. The default is
  541. .Cm yes .
  542. .It Cm DenyGroups
  543. This keyword can be followed by a list of group name patterns, separated
  544. by spaces.
  545. Login is disallowed for users whose primary group or supplementary
  546. group list matches one of the patterns.
  547. Only group names are valid; a numerical group ID is not recognized.
  548. By default, login is allowed for all groups.
  549. The allow/deny groups directives are processed in the following order:
  550. .Cm DenyGroups ,
  551. .Cm AllowGroups .
  552. .Pp
  553. See PATTERNS in
  554. .Xr ssh_config 5
  555. for more information on patterns.
  556. .It Cm DenyUsers
  557. This keyword can be followed by a list of user name patterns, separated
  558. by spaces.
  559. Login is disallowed for user names that match one of the patterns.
  560. Only user names are valid; a numerical user ID is not recognized.
  561. By default, login is allowed for all users.
  562. If the pattern takes the form USER@HOST then USER and HOST
  563. are separately checked, restricting logins to particular
  564. users from particular hosts.
  565. HOST criteria may additionally contain addresses to match in CIDR
  566. address/masklen format.
  567. The allow/deny users directives are processed in the following order:
  568. .Cm DenyUsers ,
  569. .Cm AllowUsers .
  570. .Pp
  571. See PATTERNS in
  572. .Xr ssh_config 5
  573. for more information on patterns.
  574. .It Cm DisableForwarding
  575. Disables all forwarding features, including X11,
  576. .Xr ssh-agent 1 ,
  577. TCP and StreamLocal.
  578. This option overrides all other forwarding-related options and may
  579. simplify restricted configurations.
  580. .It Cm ExposeAuthInfo
  581. Writes a temporary file containing a list of authentication methods and
  582. public credentials (e.g. keys) used to authenticate the user.
  583. The location of the file is exposed to the user session through the
  584. .Ev SSH_USER_AUTH
  585. environment variable.
  586. The default is
  587. .Cm no .
  588. .It Cm FingerprintHash
  589. Specifies the hash algorithm used when logging key fingerprints.
  590. Valid options are:
  591. .Cm md5
  592. and
  593. .Cm sha256 .
  594. The default is
  595. .Cm sha256 .
  596. .It Cm ForceCommand
  597. Forces the execution of the command specified by
  598. .Cm ForceCommand ,
  599. ignoring any command supplied by the client and
  600. .Pa ~/.ssh/rc
  601. if present.
  602. The command is invoked by using the user's login shell with the -c option.
  603. This applies to shell, command, or subsystem execution.
  604. It is most useful inside a
  605. .Cm Match
  606. block.
  607. The command originally supplied by the client is available in the
  608. .Ev SSH_ORIGINAL_COMMAND
  609. environment variable.
  610. Specifying a command of
  611. .Cm internal-sftp
  612. will force the use of an in-process SFTP server that requires no support
  613. files when used with
  614. .Cm ChrootDirectory .
  615. The default is
  616. .Cm none .
  617. .It Cm GatewayPorts
  618. Specifies whether remote hosts are allowed to connect to ports
  619. forwarded for the client.
  620. By default,
  621. .Xr sshd 8
  622. binds remote port forwardings to the loopback address.
  623. This prevents other remote hosts from connecting to forwarded ports.
  624. .Cm GatewayPorts
  625. can be used to specify that sshd
  626. should allow remote port forwardings to bind to non-loopback addresses, thus
  627. allowing other hosts to connect.
  628. The argument may be
  629. .Cm no
  630. to force remote port forwardings to be available to the local host only,
  631. .Cm yes
  632. to force remote port forwardings to bind to the wildcard address, or
  633. .Cm clientspecified
  634. to allow the client to select the address to which the forwarding is bound.
  635. The default is
  636. .Cm no .
  637. .It Cm GSSAPIAuthentication
  638. Specifies whether user authentication based on GSSAPI is allowed.
  639. The default is
  640. .Cm no .
  641. .It Cm GSSAPICleanupCredentials
  642. Specifies whether to automatically destroy the user's credentials cache
  643. on logout.
  644. The default is
  645. .Cm yes .
  646. .It Cm GSSAPIStrictAcceptorCheck
  647. Determines whether to be strict about the identity of the GSSAPI acceptor
  648. a client authenticates against.
  649. If set to
  650. .Cm yes
  651. then the client must authenticate against the host
  652. service on the current hostname.
  653. If set to
  654. .Cm no
  655. then the client may authenticate against any service key stored in the
  656. machine's default store.
  657. This facility is provided to assist with operation on multi homed machines.
  658. The default is
  659. .Cm yes .
  660. .It Cm HostbasedAcceptedAlgorithms
  661. Specifies the signature algorithms that will be accepted for hostbased
  662. authentication as a list of comma-separated patterns.
  663. Alternately if the specified list begins with a
  664. .Sq +
  665. character, then the specified signature algorithms will be appended to
  666. the default set instead of replacing them.
  667. If the specified list begins with a
  668. .Sq -
  669. character, then the specified signature algorithms (including wildcards)
  670. will be removed from the default set instead of replacing them.
  671. If the specified list begins with a
  672. .Sq ^
  673. character, then the specified signature algorithms will be placed at
  674. the head of the default set.
  675. The default for this option is:
  676. .Bd -literal -offset 3n
  677. ssh-ed25519-cert-v01@openssh.com,
  678. ecdsa-sha2-nistp256-cert-v01@openssh.com,
  679. ecdsa-sha2-nistp384-cert-v01@openssh.com,
  680. ecdsa-sha2-nistp521-cert-v01@openssh.com,
  681. sk-ssh-ed25519-cert-v01@openssh.com,
  682. sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
  683. rsa-sha2-512-cert-v01@openssh.com,
  684. rsa-sha2-256-cert-v01@openssh.com,
  685. ssh-rsa-cert-v01@openssh.com,
  686. ssh-ed25519,
  687. ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
  688. sk-ssh-ed25519@openssh.com,
  689. sk-ecdsa-sha2-nistp256@openssh.com,
  690. rsa-sha2-512,rsa-sha2-256,ssh-rsa
  691. .Ed
  692. .Pp
  693. The list of available signature algorithms may also be obtained using
  694. .Qq ssh -Q HostbasedAcceptedAlgorithms .
  695. This was formerly named HostbasedAcceptedKeyTypes.
  696. .It Cm HostbasedAuthentication
  697. Specifies whether rhosts or /etc/hosts.equiv authentication together
  698. with successful public key client host authentication is allowed
  699. (host-based authentication).
  700. The default is
  701. .Cm no .
  702. .It Cm HostbasedUsesNameFromPacketOnly
  703. Specifies whether or not the server will attempt to perform a reverse
  704. name lookup when matching the name in the
  705. .Pa ~/.shosts ,
  706. .Pa ~/.rhosts ,
  707. and
  708. .Pa /etc/hosts.equiv
  709. files during
  710. .Cm HostbasedAuthentication .
  711. A setting of
  712. .Cm yes
  713. means that
  714. .Xr sshd 8
  715. uses the name supplied by the client rather than
  716. attempting to resolve the name from the TCP connection itself.
  717. The default is
  718. .Cm no .
  719. .It Cm HostCertificate
  720. Specifies a file containing a public host certificate.
  721. The certificate's public key must match a private host key already specified
  722. by
  723. .Cm HostKey .
  724. The default behaviour of
  725. .Xr sshd 8
  726. is not to load any certificates.
  727. .It Cm HostKey
  728. Specifies a file containing a private host key
  729. used by SSH.
  730. The defaults are
  731. .Pa /etc/ssh/ssh_host_ecdsa_key ,
  732. .Pa /etc/ssh/ssh_host_ed25519_key
  733. and
  734. .Pa /etc/ssh/ssh_host_rsa_key .
  735. .Pp
  736. Note that
  737. .Xr sshd 8
  738. will refuse to use a file if it is group/world-accessible
  739. and that the
  740. .Cm HostKeyAlgorithms
  741. option restricts which of the keys are actually used by
  742. .Xr sshd 8 .
  743. .Pp
  744. It is possible to have multiple host key files.
  745. It is also possible to specify public host key files instead.
  746. In this case operations on the private key will be delegated
  747. to an
  748. .Xr ssh-agent 1 .
  749. .It Cm HostKeyAgent
  750. Identifies the UNIX-domain socket used to communicate
  751. with an agent that has access to the private host keys.
  752. If the string
  753. .Qq SSH_AUTH_SOCK
  754. is specified, the location of the socket will be read from the
  755. .Ev SSH_AUTH_SOCK
  756. environment variable.
  757. .It Cm HostKeyAlgorithms
  758. Specifies the host key signature algorithms
  759. that the server offers.
  760. The default for this option is:
  761. .Bd -literal -offset 3n
  762. ssh-ed25519-cert-v01@openssh.com,
  763. ecdsa-sha2-nistp256-cert-v01@openssh.com,
  764. ecdsa-sha2-nistp384-cert-v01@openssh.com,
  765. ecdsa-sha2-nistp521-cert-v01@openssh.com,
  766. sk-ssh-ed25519-cert-v01@openssh.com,
  767. sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
  768. rsa-sha2-512-cert-v01@openssh.com,
  769. rsa-sha2-256-cert-v01@openssh.com,
  770. ssh-rsa-cert-v01@openssh.com,
  771. ssh-ed25519,
  772. ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
  773. sk-ssh-ed25519@openssh.com,
  774. sk-ecdsa-sha2-nistp256@openssh.com,
  775. rsa-sha2-512,rsa-sha2-256,ssh-rsa
  776. .Ed
  777. .Pp
  778. The list of available signature algorithms may also be obtained using
  779. .Qq ssh -Q HostKeyAlgorithms .
  780. .It Cm IgnoreRhosts
  781. Specifies whether to ignore per-user
  782. .Pa .rhosts
  783. and
  784. .Pa .shosts
  785. files during
  786. .Cm HostbasedAuthentication .
  787. The system-wide
  788. .Pa /etc/hosts.equiv
  789. and
  790. .Pa /etc/shosts.equiv
  791. are still used regardless of this setting.
  792. .Pp
  793. Accepted values are
  794. .Cm yes
  795. (the default) to ignore all per-user files,
  796. .Cm shosts-only
  797. to allow the use of
  798. .Pa .shosts
  799. but to ignore
  800. .Pa .rhosts
  801. or
  802. .Cm no
  803. to allow both
  804. .Pa .shosts
  805. and
  806. .Pa rhosts .
  807. .It Cm IgnoreUserKnownHosts
  808. Specifies whether
  809. .Xr sshd 8
  810. should ignore the user's
  811. .Pa ~/.ssh/known_hosts
  812. during
  813. .Cm HostbasedAuthentication
  814. and use only the system-wide known hosts file
  815. .Pa /etc/ssh/known_hosts .
  816. The default is
  817. .Dq no .
  818. .It Cm Include
  819. Include the specified configuration file(s).
  820. Multiple pathnames may be specified and each pathname may contain
  821. .Xr glob 7
  822. wildcards that will be expanded and processed in lexical order.
  823. Files without absolute paths are assumed to be in
  824. .Pa /etc/ssh .
  825. An
  826. .Cm Include
  827. directive may appear inside a
  828. .Cm Match
  829. block
  830. to perform conditional inclusion.
  831. .It Cm IPQoS
  832. Specifies the IPv4 type-of-service or DSCP class for the connection.
  833. Accepted values are
  834. .Cm af11 ,
  835. .Cm af12 ,
  836. .Cm af13 ,
  837. .Cm af21 ,
  838. .Cm af22 ,
  839. .Cm af23 ,
  840. .Cm af31 ,
  841. .Cm af32 ,
  842. .Cm af33 ,
  843. .Cm af41 ,
  844. .Cm af42 ,
  845. .Cm af43 ,
  846. .Cm cs0 ,
  847. .Cm cs1 ,
  848. .Cm cs2 ,
  849. .Cm cs3 ,
  850. .Cm cs4 ,
  851. .Cm cs5 ,
  852. .Cm cs6 ,
  853. .Cm cs7 ,
  854. .Cm ef ,
  855. .Cm le ,
  856. .Cm lowdelay ,
  857. .Cm throughput ,
  858. .Cm reliability ,
  859. a numeric value, or
  860. .Cm none
  861. to use the operating system default.
  862. This option may take one or two arguments, separated by whitespace.
  863. If one argument is specified, it is used as the packet class unconditionally.
  864. If two values are specified, the first is automatically selected for
  865. interactive sessions and the second for non-interactive sessions.
  866. The default is
  867. .Cm lowdelay
  868. for interactive sessions and
  869. .Cm throughput
  870. for non-interactive sessions.
  871. .It Cm KbdInteractiveAuthentication
  872. Specifies whether to allow keyboard-interactive authentication.
  873. The argument to this keyword must be
  874. .Cm yes
  875. or
  876. .Cm no .
  877. The default is to use whatever value
  878. .Cm ChallengeResponseAuthentication
  879. is set to
  880. (by default
  881. .Cm yes ) .
  882. .It Cm KerberosAuthentication
  883. Specifies whether the password provided by the user for
  884. .Cm PasswordAuthentication
  885. will be validated through the Kerberos KDC.
  886. To use this option, the server needs a
  887. Kerberos servtab which allows the verification of the KDC's identity.
  888. The default is
  889. .Cm no .
  890. .It Cm KerberosGetAFSToken
  891. If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
  892. an AFS token before accessing the user's home directory.
  893. The default is
  894. .Cm no .
  895. .It Cm KerberosOrLocalPasswd
  896. If password authentication through Kerberos fails then
  897. the password will be validated via any additional local mechanism
  898. such as
  899. .Pa /etc/passwd .
  900. The default is
  901. .Cm yes .
  902. .It Cm KerberosTicketCleanup
  903. Specifies whether to automatically destroy the user's ticket cache
  904. file on logout.
  905. The default is
  906. .Cm yes .
  907. .It Cm KexAlgorithms
  908. Specifies the available KEX (Key Exchange) algorithms.
  909. Multiple algorithms must be comma-separated.
  910. Alternately if the specified list begins with a
  911. .Sq +
  912. character, then the specified methods will be appended to the default set
  913. instead of replacing them.
  914. If the specified list begins with a
  915. .Sq -
  916. character, then the specified methods (including wildcards) will be removed
  917. from the default set instead of replacing them.
  918. If the specified list begins with a
  919. .Sq ^
  920. character, then the specified methods will be placed at the head of the
  921. default set.
  922. The supported algorithms are:
  923. .Pp
  924. .Bl -item -compact -offset indent
  925. .It
  926. curve25519-sha256
  927. .It
  928. curve25519-sha256@libssh.org
  929. .It
  930. diffie-hellman-group1-sha1
  931. .It
  932. diffie-hellman-group14-sha1
  933. .It
  934. diffie-hellman-group14-sha256
  935. .It
  936. diffie-hellman-group16-sha512
  937. .It
  938. diffie-hellman-group18-sha512
  939. .It
  940. diffie-hellman-group-exchange-sha1
  941. .It
  942. diffie-hellman-group-exchange-sha256
  943. .It
  944. ecdh-sha2-nistp256
  945. .It
  946. ecdh-sha2-nistp384
  947. .It
  948. ecdh-sha2-nistp521
  949. .It
  950. sntrup761x25519-sha512@openssh.com
  951. .El
  952. .Pp
  953. The default is:
  954. .Bd -literal -offset indent
  955. curve25519-sha256,curve25519-sha256@libssh.org,
  956. ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
  957. diffie-hellman-group-exchange-sha256,
  958. diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,
  959. diffie-hellman-group14-sha256
  960. .Ed
  961. .Pp
  962. The list of available key exchange algorithms may also be obtained using
  963. .Qq ssh -Q KexAlgorithms .
  964. .It Cm ListenAddress
  965. Specifies the local addresses
  966. .Xr sshd 8
  967. should listen on.
  968. The following forms may be used:
  969. .Pp
  970. .Bl -item -offset indent -compact
  971. .It
  972. .Cm ListenAddress
  973. .Sm off
  974. .Ar hostname | address
  975. .Sm on
  976. .Op Cm rdomain Ar domain
  977. .It
  978. .Cm ListenAddress
  979. .Sm off
  980. .Ar hostname : port
  981. .Sm on
  982. .Op Cm rdomain Ar domain
  983. .It
  984. .Cm ListenAddress
  985. .Sm off
  986. .Ar IPv4_address : port
  987. .Sm on
  988. .Op Cm rdomain Ar domain
  989. .It
  990. .Cm ListenAddress
  991. .Sm off
  992. .Oo Ar hostname | address Oc : Ar port
  993. .Sm on
  994. .Op Cm rdomain Ar domain
  995. .El
  996. .Pp
  997. The optional
  998. .Cm rdomain
  999. qualifier requests
  1000. .Xr sshd 8
  1001. listen in an explicit routing domain.
  1002. If
  1003. .Ar port
  1004. is not specified,
  1005. sshd will listen on the address and all
  1006. .Cm Port
  1007. options specified.
  1008. The default is to listen on all local addresses on the current default
  1009. routing domain.
  1010. Multiple
  1011. .Cm ListenAddress
  1012. options are permitted.
  1013. For more information on routing domains, see
  1014. .Xr rdomain 4 .
  1015. .It Cm LoginGraceTime
  1016. The server disconnects after this time if the user has not
  1017. successfully logged in.
  1018. If the value is 0, there is no time limit.
  1019. The default is 120 seconds.
  1020. .It Cm LogLevel
  1021. Gives the verbosity level that is used when logging messages from
  1022. .Xr sshd 8 .
  1023. The possible values are:
  1024. QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
  1025. The default is INFO.
  1026. DEBUG and DEBUG1 are equivalent.
  1027. DEBUG2 and DEBUG3 each specify higher levels of debugging output.
  1028. Logging with a DEBUG level violates the privacy of users and is not recommended.
  1029. .It Cm MACs
  1030. Specifies the available MAC (message authentication code) algorithms.
  1031. The MAC algorithm is used for data integrity protection.
  1032. Multiple algorithms must be comma-separated.
  1033. If the specified list begins with a
  1034. .Sq +
  1035. character, then the specified algorithms will be appended to the default set
  1036. instead of replacing them.
  1037. If the specified list begins with a
  1038. .Sq -
  1039. character, then the specified algorithms (including wildcards) will be removed
  1040. from the default set instead of replacing them.
  1041. If the specified list begins with a
  1042. .Sq ^
  1043. character, then the specified algorithms will be placed at the head of the
  1044. default set.
  1045. .Pp
  1046. The algorithms that contain
  1047. .Qq -etm
  1048. calculate the MAC after encryption (encrypt-then-mac).
  1049. These are considered safer and their use recommended.
  1050. The supported MACs are:
  1051. .Pp
  1052. .Bl -item -compact -offset indent
  1053. .It
  1054. hmac-md5
  1055. .It
  1056. hmac-md5-96
  1057. .It
  1058. hmac-sha1
  1059. .It
  1060. hmac-sha1-96
  1061. .It
  1062. hmac-sha2-256
  1063. .It
  1064. hmac-sha2-512
  1065. .It
  1066. umac-64@openssh.com
  1067. .It
  1068. umac-128@openssh.com
  1069. .It
  1070. hmac-md5-etm@openssh.com
  1071. .It
  1072. hmac-md5-96-etm@openssh.com
  1073. .It
  1074. hmac-sha1-etm@openssh.com
  1075. .It
  1076. hmac-sha1-96-etm@openssh.com
  1077. .It
  1078. hmac-sha2-256-etm@openssh.com
  1079. .It
  1080. hmac-sha2-512-etm@openssh.com
  1081. .It
  1082. umac-64-etm@openssh.com
  1083. .It
  1084. umac-128-etm@openssh.com
  1085. .El
  1086. .Pp
  1087. The default is:
  1088. .Bd -literal -offset indent
  1089. umac-64-etm@openssh.com,umac-128-etm@openssh.com,
  1090. hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
  1091. hmac-sha1-etm@openssh.com,
  1092. umac-64@openssh.com,umac-128@openssh.com,
  1093. hmac-sha2-256,hmac-sha2-512,hmac-sha1
  1094. .Ed
  1095. .Pp
  1096. The list of available MAC algorithms may also be obtained using
  1097. .Qq ssh -Q mac .
  1098. .It Cm Match
  1099. Introduces a conditional block.
  1100. If all of the criteria on the
  1101. .Cm Match
  1102. line are satisfied, the keywords on the following lines override those
  1103. set in the global section of the config file, until either another
  1104. .Cm Match
  1105. line or the end of the file.
  1106. If a keyword appears in multiple
  1107. .Cm Match
  1108. blocks that are satisfied, only the first instance of the keyword is
  1109. applied.
  1110. .Pp
  1111. The arguments to
  1112. .Cm Match
  1113. are one or more criteria-pattern pairs or the single token
  1114. .Cm All
  1115. which matches all criteria.
  1116. The available criteria are
  1117. .Cm User ,
  1118. .Cm Group ,
  1119. .Cm Host ,
  1120. .Cm LocalAddress ,
  1121. .Cm LocalPort ,
  1122. .Cm RDomain ,
  1123. and
  1124. .Cm Address
  1125. (with
  1126. .Cm RDomain
  1127. representing the
  1128. .Xr rdomain 4
  1129. on which the connection was received).
  1130. .Pp
  1131. The match patterns may consist of single entries or comma-separated
  1132. lists and may use the wildcard and negation operators described in the
  1133. .Sx PATTERNS
  1134. section of
  1135. .Xr ssh_config 5 .
  1136. .Pp
  1137. The patterns in an
  1138. .Cm Address
  1139. criteria may additionally contain addresses to match in CIDR
  1140. address/masklen format,
  1141. such as 192.0.2.0/24 or 2001:db8::/32.
  1142. Note that the mask length provided must be consistent with the address -
  1143. it is an error to specify a mask length that is too long for the address
  1144. or one with bits set in this host portion of the address.
  1145. For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
  1146. .Pp
  1147. Only a subset of keywords may be used on the lines following a
  1148. .Cm Match
  1149. keyword.
  1150. Available keywords are
  1151. .Cm AcceptEnv ,
  1152. .Cm AllowAgentForwarding ,
  1153. .Cm AllowGroups ,
  1154. .Cm AllowStreamLocalForwarding ,
  1155. .Cm AllowTcpForwarding ,
  1156. .Cm AllowUsers ,
  1157. .Cm AuthenticationMethods ,
  1158. .Cm AuthorizedKeysCommand ,
  1159. .Cm AuthorizedKeysCommandUser ,
  1160. .Cm AuthorizedKeysFile ,
  1161. .Cm AuthorizedPrincipalsCommand ,
  1162. .Cm AuthorizedPrincipalsCommandUser ,
  1163. .Cm AuthorizedPrincipalsFile ,
  1164. .Cm Banner ,
  1165. .Cm ChrootDirectory ,
  1166. .Cm ClientAliveCountMax ,
  1167. .Cm ClientAliveInterval ,
  1168. .Cm DenyGroups ,
  1169. .Cm DenyUsers ,
  1170. .Cm DisableForwarding ,
  1171. .Cm ForceCommand ,
  1172. .Cm GatewayPorts ,
  1173. .Cm GSSAPIAuthentication ,
  1174. .Cm HostbasedAcceptedAlgorithms ,
  1175. .Cm HostbasedAuthentication ,
  1176. .Cm HostbasedUsesNameFromPacketOnly ,
  1177. .Cm IgnoreRhosts ,
  1178. .Cm Include ,
  1179. .Cm IPQoS ,
  1180. .Cm KbdInteractiveAuthentication ,
  1181. .Cm KerberosAuthentication ,
  1182. .Cm LogLevel ,
  1183. .Cm MaxAuthTries ,
  1184. .Cm MaxSessions ,
  1185. .Cm PasswordAuthentication ,
  1186. .Cm PermitEmptyPasswords ,
  1187. .Cm PermitListen ,
  1188. .Cm PermitOpen ,
  1189. .Cm PermitRootLogin ,
  1190. .Cm PermitTTY ,
  1191. .Cm PermitTunnel ,
  1192. .Cm PermitUserRC ,
  1193. .Cm PubkeyAcceptedAlgorithms ,
  1194. .Cm PubkeyAuthentication ,
  1195. .Cm RekeyLimit ,
  1196. .Cm RevokedKeys ,
  1197. .Cm RDomain ,
  1198. .Cm SetEnv ,
  1199. .Cm StreamLocalBindMask ,
  1200. .Cm StreamLocalBindUnlink ,
  1201. .Cm TrustedUserCAKeys ,
  1202. .Cm X11DisplayOffset ,
  1203. .Cm X11Forwarding
  1204. and
  1205. .Cm X11UseLocalhost .
  1206. .It Cm MaxAuthTries
  1207. Specifies the maximum number of authentication attempts permitted per
  1208. connection.
  1209. Once the number of failures reaches half this value,
  1210. additional failures are logged.
  1211. The default is 6.
  1212. .It Cm MaxSessions
  1213. Specifies the maximum number of open shell, login or subsystem (e.g. sftp)
  1214. sessions permitted per network connection.
  1215. Multiple sessions may be established by clients that support connection
  1216. multiplexing.
  1217. Setting
  1218. .Cm MaxSessions
  1219. to 1 will effectively disable session multiplexing, whereas setting it to 0
  1220. will prevent all shell, login and subsystem sessions while still permitting
  1221. forwarding.
  1222. The default is 10.
  1223. .It Cm MaxStartups
  1224. Specifies the maximum number of concurrent unauthenticated connections to the
  1225. SSH daemon.
  1226. Additional connections will be dropped until authentication succeeds or the
  1227. .Cm LoginGraceTime
  1228. expires for a connection.
  1229. The default is 10:30:100.
  1230. .Pp
  1231. Alternatively, random early drop can be enabled by specifying
  1232. the three colon separated values
  1233. start:rate:full (e.g. "10:30:60").
  1234. .Xr sshd 8
  1235. will refuse connection attempts with a probability of rate/100 (30%)
  1236. if there are currently start (10) unauthenticated connections.
  1237. The probability increases linearly and all connection attempts
  1238. are refused if the number of unauthenticated connections reaches full (60).
  1239. .It Cm PasswordAuthentication
  1240. Specifies whether password authentication is allowed.
  1241. The default is
  1242. .Cm yes .
  1243. .It Cm PermitEmptyPasswords
  1244. When password authentication is allowed, it specifies whether the
  1245. server allows login to accounts with empty password strings.
  1246. The default is
  1247. .Cm no .
  1248. .It Cm PermitListen
  1249. Specifies the addresses/ports on which a remote TCP port forwarding may listen.
  1250. The listen specification must be one of the following forms:
  1251. .Pp
  1252. .Bl -item -offset indent -compact
  1253. .It
  1254. .Cm PermitListen
  1255. .Sm off
  1256. .Ar port
  1257. .Sm on
  1258. .It
  1259. .Cm PermitListen
  1260. .Sm off
  1261. .Ar host : port
  1262. .Sm on
  1263. .El
  1264. .Pp
  1265. Multiple permissions may be specified by separating them with whitespace.
  1266. An argument of
  1267. .Cm any
  1268. can be used to remove all restrictions and permit any listen requests.
  1269. An argument of
  1270. .Cm none
  1271. can be used to prohibit all listen requests.
  1272. The host name may contain wildcards as described in the PATTERNS section in
  1273. .Xr ssh_config 5 .
  1274. The wildcard
  1275. .Sq *
  1276. can also be used in place of a port number to allow all ports.
  1277. By default all port forwarding listen requests are permitted.
  1278. Note that the
  1279. .Cm GatewayPorts
  1280. option may further restrict which addresses may be listened on.
  1281. Note also that
  1282. .Xr ssh 1
  1283. will request a listen host of
  1284. .Dq localhost
  1285. if no listen host was specifically requested, and this name is
  1286. treated differently to explicit localhost addresses of
  1287. .Dq 127.0.0.1
  1288. and
  1289. .Dq ::1 .
  1290. .It Cm PermitOpen
  1291. Specifies the destinations to which TCP port forwarding is permitted.
  1292. The forwarding specification must be one of the following forms:
  1293. .Pp
  1294. .Bl -item -offset indent -compact
  1295. .It
  1296. .Cm PermitOpen
  1297. .Sm off
  1298. .Ar host : port
  1299. .Sm on
  1300. .It
  1301. .Cm PermitOpen
  1302. .Sm off
  1303. .Ar IPv4_addr : port
  1304. .Sm on
  1305. .It
  1306. .Cm PermitOpen
  1307. .Sm off
  1308. .Ar \&[ IPv6_addr \&] : port
  1309. .Sm on
  1310. .El
  1311. .Pp
  1312. Multiple forwards may be specified by separating them with whitespace.
  1313. An argument of
  1314. .Cm any
  1315. can be used to remove all restrictions and permit any forwarding requests.
  1316. An argument of
  1317. .Cm none
  1318. can be used to prohibit all forwarding requests.
  1319. The wildcard
  1320. .Sq *
  1321. can be used for host or port to allow all hosts or ports respectively.
  1322. Otherwise, no pattern matching or address lookups are performed on supplied
  1323. names.
  1324. By default all port forwarding requests are permitted.
  1325. .It Cm PermitRootLogin
  1326. Specifies whether root can log in using
  1327. .Xr ssh 1 .
  1328. The argument must be
  1329. .Cm yes ,
  1330. .Cm prohibit-password ,
  1331. .Cm forced-commands-only ,
  1332. or
  1333. .Cm no .
  1334. The default is
  1335. .Cm prohibit-password .
  1336. .Pp
  1337. If this option is set to
  1338. .Cm prohibit-password
  1339. (or its deprecated alias,
  1340. .Cm without-password ) ,
  1341. password and keyboard-interactive authentication are disabled for root.
  1342. .Pp
  1343. If this option is set to
  1344. .Cm forced-commands-only ,
  1345. root login with public key authentication will be allowed,
  1346. but only if the
  1347. .Ar command
  1348. option has been specified
  1349. (which may be useful for taking remote backups even if root login is
  1350. normally not allowed).
  1351. All other authentication methods are disabled for root.
  1352. .Pp
  1353. If this option is set to
  1354. .Cm no ,
  1355. root is not allowed to log in.
  1356. .It Cm PermitTTY
  1357. Specifies whether
  1358. .Xr pty 4
  1359. allocation is permitted.
  1360. The default is
  1361. .Cm yes .
  1362. .It Cm PermitTunnel
  1363. Specifies whether
  1364. .Xr tun 4
  1365. device forwarding is allowed.
  1366. The argument must be
  1367. .Cm yes ,
  1368. .Cm point-to-point
  1369. (layer 3),
  1370. .Cm ethernet
  1371. (layer 2), or
  1372. .Cm no .
  1373. Specifying
  1374. .Cm yes
  1375. permits both
  1376. .Cm point-to-point
  1377. and
  1378. .Cm ethernet .
  1379. The default is
  1380. .Cm no .
  1381. .Pp
  1382. Independent of this setting, the permissions of the selected
  1383. .Xr tun 4
  1384. device must allow access to the user.
  1385. .It Cm PermitUserEnvironment
  1386. Specifies whether
  1387. .Pa ~/.ssh/environment
  1388. and
  1389. .Cm environment=
  1390. options in
  1391. .Pa ~/.ssh/authorized_keys
  1392. are processed by
  1393. .Xr sshd 8 .
  1394. Valid options are
  1395. .Cm yes ,
  1396. .Cm no
  1397. or a pattern-list specifying which environment variable names to accept
  1398. (for example
  1399. .Qq LANG,LC_* ) .
  1400. The default is
  1401. .Cm no .
  1402. Enabling environment processing may enable users to bypass access
  1403. restrictions in some configurations using mechanisms such as
  1404. .Ev LD_PRELOAD .
  1405. .It Cm PermitUserRC
  1406. Specifies whether any
  1407. .Pa ~/.ssh/rc
  1408. file is executed.
  1409. The default is
  1410. .Cm yes .
  1411. .It Cm PerSourceMaxStartups
  1412. Specifies the number of unauthenticated connections allowed from a
  1413. given source address, or
  1414. .Dq none
  1415. if there is no limit.
  1416. This limit is applied in addition to
  1417. .Cm MaxStartups ,
  1418. whichever is lower.
  1419. The default is
  1420. .Cm none .
  1421. .It Cm PerSourceNetBlockSize
  1422. Specifies the number of bits of source address that are grouped together
  1423. for the purposes of applying PerSourceMaxStartups limits.
  1424. Values for IPv4 and optionally IPv6 may be specified, separated by a colon.
  1425. The default is
  1426. .Cm 32:128 ,
  1427. which means each address is considered individually.
  1428. .It Cm PidFile
  1429. Specifies the file that contains the process ID of the
  1430. SSH daemon, or
  1431. .Cm none
  1432. to not write one.
  1433. The default is
  1434. .Pa /var/run/sshd.pid .
  1435. .It Cm Port
  1436. Specifies the port number that
  1437. .Xr sshd 8
  1438. listens on.
  1439. The default is 22.
  1440. Multiple options of this type are permitted.
  1441. See also
  1442. .Cm ListenAddress .
  1443. .It Cm PrintLastLog
  1444. Specifies whether
  1445. .Xr sshd 8
  1446. should print the date and time of the last user login when a user logs
  1447. in interactively.
  1448. The default is
  1449. .Cm yes .
  1450. .It Cm PrintMotd
  1451. Specifies whether
  1452. .Xr sshd 8
  1453. should print
  1454. .Pa /etc/motd
  1455. when a user logs in interactively.
  1456. (On some systems it is also printed by the shell,
  1457. .Pa /etc/profile ,
  1458. or equivalent.)
  1459. The default is
  1460. .Cm yes .
  1461. .It Cm PubkeyAcceptedAlgorithms
  1462. Specifies the signature algorithms that will be accepted for public key
  1463. authentication as a list of comma-separated patterns.
  1464. Alternately if the specified list begins with a
  1465. .Sq +
  1466. character, then the specified algorithms will be appended to the default set
  1467. instead of replacing them.
  1468. If the specified list begins with a
  1469. .Sq -
  1470. character, then the specified algorithms (including wildcards) will be removed
  1471. from the default set instead of replacing them.
  1472. If the specified list begins with a
  1473. .Sq ^
  1474. character, then the specified algorithms will be placed at the head of the
  1475. default set.
  1476. The default for this option is:
  1477. .Bd -literal -offset 3n
  1478. ssh-ed25519-cert-v01@openssh.com,
  1479. ecdsa-sha2-nistp256-cert-v01@openssh.com,
  1480. ecdsa-sha2-nistp384-cert-v01@openssh.com,
  1481. ecdsa-sha2-nistp521-cert-v01@openssh.com,
  1482. sk-ssh-ed25519-cert-v01@openssh.com,
  1483. sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
  1484. rsa-sha2-512-cert-v01@openssh.com,
  1485. rsa-sha2-256-cert-v01@openssh.com,
  1486. ssh-rsa-cert-v01@openssh.com,
  1487. ssh-ed25519,
  1488. ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
  1489. sk-ssh-ed25519@openssh.com,
  1490. sk-ecdsa-sha2-nistp256@openssh.com,
  1491. rsa-sha2-512,rsa-sha2-256,ssh-rsa
  1492. .Ed
  1493. .Pp
  1494. The list of available signature algorithms may also be obtained using
  1495. .Qq ssh -Q PubkeyAcceptedAlgorithms .
  1496. .It Cm PubkeyAuthOptions
  1497. Sets one or more public key authentication options.
  1498. The supported keywords are:
  1499. .Cm none
  1500. (the default; indicating no additional options are enabled),
  1501. .Cm touch-required
  1502. and
  1503. .Cm verify-required .
  1504. .Pp
  1505. The
  1506. .Cm touch-required
  1507. option causes public key authentication using a FIDO authenticator algorithm
  1508. (i.e.\&
  1509. .Cm ecdsa-sk
  1510. or
  1511. .Cm ed25519-sk )
  1512. to always require the signature to attest that a physically present user
  1513. explicitly confirmed the authentication (usually by touching the authenticator).
  1514. By default,
  1515. .Xr sshd 8
  1516. requires user presence unless overridden with an authorized_keys option.
  1517. The
  1518. .Cm touch-required
  1519. flag disables this override.
  1520. .Pp
  1521. The
  1522. .Cm verify-required
  1523. option requires a FIDO key signature attest that the user was verified,
  1524. e.g. via a PIN.
  1525. .Pp
  1526. Neither the
  1527. .Cm touch-required
  1528. or
  1529. .Cm verify-required
  1530. options have any effect for other, non-FIDO, public key types.
  1531. .It Cm PubkeyAuthentication
  1532. Specifies whether public key authentication is allowed.
  1533. The default is
  1534. .Cm yes .
  1535. .It Cm RekeyLimit
  1536. Specifies the maximum amount of data that may be transmitted before the
  1537. session key is renegotiated, optionally followed by a maximum amount of
  1538. time that may pass before the session key is renegotiated.
  1539. The first argument is specified in bytes and may have a suffix of
  1540. .Sq K ,
  1541. .Sq M ,
  1542. or
  1543. .Sq G
  1544. to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
  1545. The default is between
  1546. .Sq 1G
  1547. and
  1548. .Sq 4G ,
  1549. depending on the cipher.
  1550. The optional second value is specified in seconds and may use any of the
  1551. units documented in the
  1552. .Sx TIME FORMATS
  1553. section.
  1554. The default value for
  1555. .Cm RekeyLimit
  1556. is
  1557. .Cm default none ,
  1558. which means that rekeying is performed after the cipher's default amount
  1559. of data has been sent or received and no time based rekeying is done.
  1560. .It Cm RevokedKeys
  1561. Specifies revoked public keys file, or
  1562. .Cm none
  1563. to not use one.
  1564. Keys listed in this file will be refused for public key authentication.
  1565. Note that if this file is not readable, then public key authentication will
  1566. be refused for all users.
  1567. Keys may be specified as a text file, listing one public key per line, or as
  1568. an OpenSSH Key Revocation List (KRL) as generated by
  1569. .Xr ssh-keygen 1 .
  1570. For more information on KRLs, see the KEY REVOCATION LISTS section in
  1571. .Xr ssh-keygen 1 .
  1572. .It Cm RDomain
  1573. Specifies an explicit routing domain that is applied after authentication
  1574. has completed.
  1575. The user session, as well and any forwarded or listening IP sockets,
  1576. will be bound to this
  1577. .Xr rdomain 4 .
  1578. If the routing domain is set to
  1579. .Cm \&%D ,
  1580. then the domain in which the incoming connection was received will be applied.
  1581. .It Cm SecurityKeyProvider
  1582. Specifies a path to a library that will be used when loading
  1583. FIDO authenticator-hosted keys, overriding the default of using
  1584. the built-in USB HID support.
  1585. .It Cm SetEnv
  1586. Specifies one or more environment variables to set in child sessions started
  1587. by
  1588. .Xr sshd 8
  1589. as
  1590. .Dq NAME=VALUE .
  1591. The environment value may be quoted (e.g. if it contains whitespace
  1592. characters).
  1593. Environment variables set by
  1594. .Cm SetEnv
  1595. override the default environment and any variables specified by the user
  1596. via
  1597. .Cm AcceptEnv
  1598. or
  1599. .Cm PermitUserEnvironment .
  1600. .It Cm StreamLocalBindMask
  1601. Sets the octal file creation mode mask
  1602. .Pq umask
  1603. used when creating a Unix-domain socket file for local or remote
  1604. port forwarding.
  1605. This option is only used for port forwarding to a Unix-domain socket file.
  1606. .Pp
  1607. The default value is 0177, which creates a Unix-domain socket file that is
  1608. readable and writable only by the owner.
  1609. Note that not all operating systems honor the file mode on Unix-domain
  1610. socket files.
  1611. .It Cm StreamLocalBindUnlink
  1612. Specifies whether to remove an existing Unix-domain socket file for local
  1613. or remote port forwarding before creating a new one.
  1614. If the socket file already exists and
  1615. .Cm StreamLocalBindUnlink
  1616. is not enabled,
  1617. .Nm sshd
  1618. will be unable to forward the port to the Unix-domain socket file.
  1619. This option is only used for port forwarding to a Unix-domain socket file.
  1620. .Pp
  1621. The argument must be
  1622. .Cm yes
  1623. or
  1624. .Cm no .
  1625. The default is
  1626. .Cm no .
  1627. .It Cm StrictModes
  1628. Specifies whether
  1629. .Xr sshd 8
  1630. should check file modes and ownership of the
  1631. user's files and home directory before accepting login.
  1632. This is normally desirable because novices sometimes accidentally leave their
  1633. directory or files world-writable.
  1634. The default is
  1635. .Cm yes .
  1636. Note that this does not apply to
  1637. .Cm ChrootDirectory ,
  1638. whose permissions and ownership are checked unconditionally.
  1639. .It Cm Subsystem
  1640. Configures an external subsystem (e.g. file transfer daemon).
  1641. Arguments should be a subsystem name and a command (with optional arguments)
  1642. to execute upon subsystem request.
  1643. .Pp
  1644. The command
  1645. .Cm sftp-server
  1646. implements the SFTP file transfer subsystem.
  1647. .Pp
  1648. Alternately the name
  1649. .Cm internal-sftp
  1650. implements an in-process SFTP server.
  1651. This may simplify configurations using
  1652. .Cm ChrootDirectory
  1653. to force a different filesystem root on clients.
  1654. .Pp
  1655. By default no subsystems are defined.
  1656. .It Cm SyslogFacility
  1657. Gives the facility code that is used when logging messages from
  1658. .Xr sshd 8 .
  1659. The possible values are: DAEMON, USER, AUTH, AUTHPRIV, LOCAL0, LOCAL1, LOCAL2,
  1660. LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
  1661. The default is AUTH.
  1662. .It Cm TCPKeepAlive
  1663. Specifies whether the system should send TCP keepalive messages to the
  1664. other side.
  1665. If they are sent, death of the connection or crash of one
  1666. of the machines will be properly noticed.
  1667. However, this means that
  1668. connections will die if the route is down temporarily, and some people
  1669. find it annoying.
  1670. On the other hand, if TCP keepalives are not sent,
  1671. sessions may hang indefinitely on the server, leaving
  1672. .Qq ghost
  1673. users and consuming server resources.
  1674. .Pp
  1675. The default is
  1676. .Cm yes
  1677. (to send TCP keepalive messages), and the server will notice
  1678. if the network goes down or the client host crashes.
  1679. This avoids infinitely hanging sessions.
  1680. .Pp
  1681. To disable TCP keepalive messages, the value should be set to
  1682. .Cm no .
  1683. .Pp
  1684. This option was formerly called
  1685. .Cm KeepAlive .
  1686. .It Cm TrustedUserCAKeys
  1687. Specifies a file containing public keys of certificate authorities that are
  1688. trusted to sign user certificates for authentication, or
  1689. .Cm none
  1690. to not use one.
  1691. Keys are listed one per line; empty lines and comments starting with
  1692. .Ql #
  1693. are allowed.
  1694. If a certificate is presented for authentication and has its signing CA key
  1695. listed in this file, then it may be used for authentication for any user
  1696. listed in the certificate's principals list.
  1697. Note that certificates that lack a list of principals will not be permitted
  1698. for authentication using
  1699. .Cm TrustedUserCAKeys .
  1700. For more details on certificates, see the CERTIFICATES section in
  1701. .Xr ssh-keygen 1 .
  1702. .It Cm UseDNS
  1703. Specifies whether
  1704. .Xr sshd 8
  1705. should look up the remote host name, and to check that
  1706. the resolved host name for the remote IP address maps back to the
  1707. very same IP address.
  1708. .Pp
  1709. If this option is set to
  1710. .Cm no
  1711. (the default) then only addresses and not host names may be used in
  1712. .Pa ~/.ssh/authorized_keys
  1713. .Cm from
  1714. and
  1715. .Nm
  1716. .Cm Match
  1717. .Cm Host
  1718. directives.
  1719. .It Cm UsePAM
  1720. Enables the Pluggable Authentication Module interface.
  1721. If set to
  1722. .Cm yes
  1723. this will enable PAM authentication using
  1724. .Cm ChallengeResponseAuthentication
  1725. and
  1726. .Cm PasswordAuthentication
  1727. in addition to PAM account and session module processing for all
  1728. authentication types.
  1729. .Pp
  1730. Because PAM challenge-response authentication usually serves an equivalent
  1731. role to password authentication, you should disable either
  1732. .Cm PasswordAuthentication
  1733. or
  1734. .Cm ChallengeResponseAuthentication.
  1735. .Pp
  1736. If
  1737. .Cm UsePAM
  1738. is enabled, you will not be able to run
  1739. .Xr sshd 8
  1740. as a non-root user.
  1741. The default is
  1742. .Cm no .
  1743. .It Cm VersionAddendum
  1744. Optionally specifies additional text to append to the SSH protocol banner
  1745. sent by the server upon connection.
  1746. The default is
  1747. .Cm none .
  1748. .It Cm X11DisplayOffset
  1749. Specifies the first display number available for
  1750. .Xr sshd 8 Ns 's
  1751. X11 forwarding.
  1752. This prevents sshd from interfering with real X11 servers.
  1753. The default is 10.
  1754. .It Cm X11Forwarding
  1755. Specifies whether X11 forwarding is permitted.
  1756. The argument must be
  1757. .Cm yes
  1758. or
  1759. .Cm no .
  1760. The default is
  1761. .Cm no .
  1762. .Pp
  1763. When X11 forwarding is enabled, there may be additional exposure to
  1764. the server and to client displays if the
  1765. .Xr sshd 8
  1766. proxy display is configured to listen on the wildcard address (see
  1767. .Cm X11UseLocalhost ) ,
  1768. though this is not the default.
  1769. Additionally, the authentication spoofing and authentication data
  1770. verification and substitution occur on the client side.
  1771. The security risk of using X11 forwarding is that the client's X11
  1772. display server may be exposed to attack when the SSH client requests
  1773. forwarding (see the warnings for
  1774. .Cm ForwardX11
  1775. in
  1776. .Xr ssh_config 5 ) .
  1777. A system administrator may have a stance in which they want to
  1778. protect clients that may expose themselves to attack by unwittingly
  1779. requesting X11 forwarding, which can warrant a
  1780. .Cm no
  1781. setting.
  1782. .Pp
  1783. Note that disabling X11 forwarding does not prevent users from
  1784. forwarding X11 traffic, as users can always install their own forwarders.
  1785. .It Cm X11UseLocalhost
  1786. Specifies whether
  1787. .Xr sshd 8
  1788. should bind the X11 forwarding server to the loopback address or to
  1789. the wildcard address.
  1790. By default,
  1791. sshd binds the forwarding server to the loopback address and sets the
  1792. hostname part of the
  1793. .Ev DISPLAY
  1794. environment variable to
  1795. .Cm localhost .
  1796. This prevents remote hosts from connecting to the proxy display.
  1797. However, some older X11 clients may not function with this
  1798. configuration.
  1799. .Cm X11UseLocalhost
  1800. may be set to
  1801. .Cm no
  1802. to specify that the forwarding server should be bound to the wildcard
  1803. address.
  1804. The argument must be
  1805. .Cm yes
  1806. or
  1807. .Cm no .
  1808. The default is
  1809. .Cm yes .
  1810. .It Cm XAuthLocation
  1811. Specifies the full pathname of the
  1812. .Xr xauth 1
  1813. program, or
  1814. .Cm none
  1815. to not use one.
  1816. The default is
  1817. .Pa /usr/X11R6/bin/xauth .
  1818. .El
  1819. .Sh TIME FORMATS
  1820. .Xr sshd 8
  1821. command-line arguments and configuration file options that specify time
  1822. may be expressed using a sequence of the form:
  1823. .Sm off
  1824. .Ar time Op Ar qualifier ,
  1825. .Sm on
  1826. where
  1827. .Ar time
  1828. is a positive integer value and
  1829. .Ar qualifier
  1830. is one of the following:
  1831. .Pp
  1832. .Bl -tag -width Ds -compact -offset indent
  1833. .It Aq Cm none
  1834. seconds
  1835. .It Cm s | Cm S
  1836. seconds
  1837. .It Cm m | Cm M
  1838. minutes
  1839. .It Cm h | Cm H
  1840. hours
  1841. .It Cm d | Cm D
  1842. days
  1843. .It Cm w | Cm W
  1844. weeks
  1845. .El
  1846. .Pp
  1847. Each member of the sequence is added together to calculate
  1848. the total time value.
  1849. .Pp
  1850. Time format examples:
  1851. .Pp
  1852. .Bl -tag -width Ds -compact -offset indent
  1853. .It 600
  1854. 600 seconds (10 minutes)
  1855. .It 10m
  1856. 10 minutes
  1857. .It 1h30m
  1858. 1 hour 30 minutes (90 minutes)
  1859. .El
  1860. .Sh TOKENS
  1861. Arguments to some keywords can make use of tokens,
  1862. which are expanded at runtime:
  1863. .Pp
  1864. .Bl -tag -width XXXX -offset indent -compact
  1865. .It %%
  1866. A literal
  1867. .Sq % .
  1868. .It \&%D
  1869. The routing domain in which the incoming connection was received.
  1870. .It %F
  1871. The fingerprint of the CA key.
  1872. .It %f
  1873. The fingerprint of the key or certificate.
  1874. .It %h
  1875. The home directory of the user.
  1876. .It %i
  1877. The key ID in the certificate.
  1878. .It %K
  1879. The base64-encoded CA key.
  1880. .It %k
  1881. The base64-encoded key or certificate for authentication.
  1882. .It %s
  1883. The serial number of the certificate.
  1884. .It \&%T
  1885. The type of the CA key.
  1886. .It %t
  1887. The key or certificate type.
  1888. .It \&%U
  1889. The numeric user ID of the target user.
  1890. .It %u
  1891. The username.
  1892. .El
  1893. .Pp
  1894. .Cm AuthorizedKeysCommand
  1895. accepts the tokens %%, %f, %h, %k, %t, %U, and %u.
  1896. .Pp
  1897. .Cm AuthorizedKeysFile
  1898. accepts the tokens %%, %h, %U, and %u.
  1899. .Pp
  1900. .Cm AuthorizedPrincipalsCommand
  1901. accepts the tokens %%, %F, %f, %h, %i, %K, %k, %s, %T, %t, %U, and %u.
  1902. .Pp
  1903. .Cm AuthorizedPrincipalsFile
  1904. accepts the tokens %%, %h, %U, and %u.
  1905. .Pp
  1906. .Cm ChrootDirectory
  1907. accepts the tokens %%, %h, %U, and %u.
  1908. .Pp
  1909. .Cm RoutingDomain
  1910. accepts the token %D.
  1911. .Sh FILES
  1912. .Bl -tag -width Ds
  1913. .It Pa /etc/ssh/sshd_config
  1914. Contains configuration data for
  1915. .Xr sshd 8 .
  1916. This file should be writable by root only, but it is recommended
  1917. (though not necessary) that it be world-readable.
  1918. .El
  1919. .Sh SEE ALSO
  1920. .Xr sftp-server 8 ,
  1921. .Xr sshd 8
  1922. .Sh AUTHORS
  1923. .An -nosplit
  1924. OpenSSH is a derivative of the original and free
  1925. ssh 1.2.12 release by
  1926. .An Tatu Ylonen .
  1927. .An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos ,
  1928. .An Theo de Raadt
  1929. and
  1930. .An Dug Song
  1931. removed many bugs, re-added newer features and
  1932. created OpenSSH.
  1933. .An Markus Friedl
  1934. contributed the support for SSH protocol versions 1.5 and 2.0.
  1935. .An Niels Provos
  1936. and
  1937. .An Markus Friedl
  1938. contributed support for privilege separation.