diff options
Diffstat (limited to 'sshd.8')
-rw-r--r-- | sshd.8 | 77 |
1 files changed, 67 insertions, 10 deletions
@@ -34,8 +34,8 @@ | |||
34 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 34 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
35 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 35 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
36 | .\" | 36 | .\" |
37 | .\" $OpenBSD: sshd.8,v 1.248 2009/03/26 08:38:39 sobrado Exp $ | 37 | .\" $OpenBSD: sshd.8,v 1.255 2010/03/05 06:50:35 jmc Exp $ |
38 | .Dd $Mdocdate: March 26 2009 $ | 38 | .Dd $Mdocdate: March 5 2010 $ |
39 | .Dt SSHD 8 | 39 | .Dt SSHD 8 |
40 | .Os | 40 | .Os |
41 | .Sh NAME | 41 | .Sh NAME |
@@ -47,6 +47,7 @@ | |||
47 | .Op Fl 46DdeiqTt | 47 | .Op Fl 46DdeiqTt |
48 | .Op Fl b Ar bits | 48 | .Op Fl b Ar bits |
49 | .Op Fl C Ar connection_spec | 49 | .Op Fl C Ar connection_spec |
50 | .Op Fl c Ar host_certificate_file | ||
50 | .Op Fl f Ar config_file | 51 | .Op Fl f Ar config_file |
51 | .Op Fl g Ar login_grace_time | 52 | .Op Fl g Ar login_grace_time |
52 | .Op Fl h Ar host_key_file | 53 | .Op Fl h Ar host_key_file |
@@ -119,6 +120,15 @@ and | |||
119 | All are required and may be supplied in any order, either with multiple | 120 | All are required and may be supplied in any order, either with multiple |
120 | .Fl C | 121 | .Fl C |
121 | options or as a comma-separated list. | 122 | options or as a comma-separated list. |
123 | .It Fl c Ar host_certificate_file | ||
124 | Specifies a path to a certificate file to identify | ||
125 | .Nm | ||
126 | during key exchange. | ||
127 | The certificate file must match a host key file specified using the | ||
128 | .Fl h | ||
129 | option or the | ||
130 | .Cm HostKey | ||
131 | configuration directive. | ||
122 | .It Fl D | 132 | .It Fl D |
123 | When this option is specified, | 133 | When this option is specified, |
124 | .Nm | 134 | .Nm |
@@ -127,8 +137,8 @@ This allows easy monitoring of | |||
127 | .Nm sshd . | 137 | .Nm sshd . |
128 | .It Fl d | 138 | .It Fl d |
129 | Debug mode. | 139 | Debug mode. |
130 | The server sends verbose debug output to the system | 140 | The server sends verbose debug output to standard error, |
131 | log, and does not put itself in the background. | 141 | and does not put itself in the background. |
132 | The server also will not fork and will only process one connection. | 142 | The server also will not fork and will only process one connection. |
133 | This option is only intended for debugging for the server. | 143 | This option is only intended for debugging for the server. |
134 | Multiple | 144 | Multiple |
@@ -260,7 +270,7 @@ or | |||
260 | .El | 270 | .El |
261 | .Sh AUTHENTICATION | 271 | .Sh AUTHENTICATION |
262 | The OpenSSH SSH daemon supports SSH protocols 1 and 2. | 272 | The OpenSSH SSH daemon supports SSH protocols 1 and 2. |
263 | Both protocols are supported by default, | 273 | The default is to use protocol 2 only, |
264 | though this can be changed via the | 274 | though this can be changed via the |
265 | .Cm Protocol | 275 | .Cm Protocol |
266 | option in | 276 | option in |
@@ -498,6 +508,13 @@ No spaces are permitted, except within double quotes. | |||
498 | The following option specifications are supported (note | 508 | The following option specifications are supported (note |
499 | that option keywords are case-insensitive): | 509 | that option keywords are case-insensitive): |
500 | .Bl -tag -width Ds | 510 | .Bl -tag -width Ds |
511 | .It Cm cert-authority | ||
512 | Specifies that the listed key is a certification authority (CA) that is | ||
513 | trusted to validate signed certificates for user authentication. | ||
514 | .Pp | ||
515 | Certificates may encode access restrictions similar to these key options. | ||
516 | If both certificate restrictions and key options are present, the most | ||
517 | restrictive union of the two is applied. | ||
501 | .It Cm command="command" | 518 | .It Cm command="command" |
502 | Specifies that the command is executed whenever this key is used for | 519 | Specifies that the command is executed whenever this key is used for |
503 | authentication. | 520 | authentication. |
@@ -517,6 +534,10 @@ The command originally supplied by the client is available in the | |||
517 | .Ev SSH_ORIGINAL_COMMAND | 534 | .Ev SSH_ORIGINAL_COMMAND |
518 | environment variable. | 535 | environment variable. |
519 | Note that this option applies to shell, command or subsystem execution. | 536 | Note that this option applies to shell, command or subsystem execution. |
537 | Also note that this command may be superseded by either a | ||
538 | .Xr sshd_config 5 | ||
539 | .Cm ForceCommand | ||
540 | directive or a command embedded in a certificate. | ||
520 | .It Cm environment="NAME=value" | 541 | .It Cm environment="NAME=value" |
521 | Specifies that the string is to be added to the environment when | 542 | Specifies that the string is to be added to the environment when |
522 | logging in using this key. | 543 | logging in using this key. |
@@ -613,10 +634,19 @@ be prepared by the administrator (optional), and the per-user file is | |||
613 | maintained automatically: whenever the user connects from an unknown host, | 634 | maintained automatically: whenever the user connects from an unknown host, |
614 | its key is added to the per-user file. | 635 | its key is added to the per-user file. |
615 | .Pp | 636 | .Pp |
616 | Each line in these files contains the following fields: hostnames, | 637 | Each line in these files contains the following fields: markers (optional), |
617 | bits, exponent, modulus, comment. | 638 | hostnames, bits, exponent, modulus, comment. |
618 | The fields are separated by spaces. | 639 | The fields are separated by spaces. |
619 | .Pp | 640 | .Pp |
641 | The marker is optional, but if it is present then it must be one of | ||
642 | .Dq @cert-authority , | ||
643 | to indicate that the line contains a certification authority (CA) key, | ||
644 | or | ||
645 | .Dq @revoked , | ||
646 | to indicate that the key contained on the line is revoked and must not ever | ||
647 | be accepted. | ||
648 | Only one marker should be used on a key line. | ||
649 | .Pp | ||
620 | Hostnames is a comma-separated list of patterns | 650 | Hostnames is a comma-separated list of patterns |
621 | .Pf ( Ql * | 651 | .Pf ( Ql * |
622 | and | 652 | and |
@@ -656,8 +686,25 @@ Lines starting with | |||
656 | and empty lines are ignored as comments. | 686 | and empty lines are ignored as comments. |
657 | .Pp | 687 | .Pp |
658 | When performing host authentication, authentication is accepted if any | 688 | When performing host authentication, authentication is accepted if any |
659 | matching line has the proper key. | 689 | matching line has the proper key; either one that matches exactly or, |
660 | It is thus permissible (but not | 690 | if the server has presented a certificate for authentication, the key |
691 | of the certification authority that signed the certificate. | ||
692 | For a key to be trusted as a certification authority, it must use the | ||
693 | .Dq @cert-authority | ||
694 | marker described above. | ||
695 | .Pp | ||
696 | The known hosts file also provides a facility to mark keys as revoked, | ||
697 | for example when it is known that the associated private key has been | ||
698 | stolen. | ||
699 | Revoked keys are specified by including the | ||
700 | .Dq @revoked | ||
701 | marker at the beginning of the key line, and are never accepted for | ||
702 | authentication or as certification authorities, but instead will | ||
703 | produce a warning from | ||
704 | .Xr ssh 1 | ||
705 | when they are encountered. | ||
706 | .Pp | ||
707 | It is permissible (but not | ||
661 | recommended) to have several lines or different host keys for the same | 708 | recommended) to have several lines or different host keys for the same |
662 | names. | 709 | names. |
663 | This will inevitably happen when short forms of host names | 710 | This will inevitably happen when short forms of host names |
@@ -668,10 +715,16 @@ accepted if valid information can be found from either file. | |||
668 | .Pp | 715 | .Pp |
669 | Note that the lines in these files are typically hundreds of characters | 716 | Note that the lines in these files are typically hundreds of characters |
670 | long, and you definitely don't want to type in the host keys by hand. | 717 | long, and you definitely don't want to type in the host keys by hand. |
671 | Rather, generate them by a script | 718 | Rather, generate them by a script, |
719 | .Xr ssh-keyscan 1 | ||
672 | or by taking | 720 | or by taking |
673 | .Pa /etc/ssh/ssh_host_key.pub | 721 | .Pa /etc/ssh/ssh_host_key.pub |
674 | and adding the host names at the front. | 722 | and adding the host names at the front. |
723 | .Xr ssh-keygen 1 | ||
724 | also offers some basic automated editing for | ||
725 | .Pa ~/.ssh/known_hosts | ||
726 | including removing hosts matching a host name and converting all host | ||
727 | names to their hashed representations. | ||
675 | .Pp | 728 | .Pp |
676 | An example ssh_known_hosts file: | 729 | An example ssh_known_hosts file: |
677 | .Bd -literal -offset 3n | 730 | .Bd -literal -offset 3n |
@@ -681,6 +734,10 @@ cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....= | |||
681 | # A hashed hostname | 734 | # A hashed hostname |
682 | |1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa | 735 | |1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa |
683 | AAAA1234.....= | 736 | AAAA1234.....= |
737 | # A revoked key | ||
738 | @revoked * ssh-rsa AAAAB5W... | ||
739 | # A CA key, accepted for any host in *.mydomain.com or *.mydomain.org | ||
740 | @cert-authority *.mydomain.org,*.mydomain.com ssh-rsa AAAAB5W... | ||
684 | .Ed | 741 | .Ed |
685 | .Sh FILES | 742 | .Sh FILES |
686 | .Bl -tag -width Ds -compact | 743 | .Bl -tag -width Ds -compact |