diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ssh.1 | 569 | ||||
-rw-r--r-- | ssh_config.5 | 621 | ||||
-rw-r--r-- | sshd.8 | 641 | ||||
-rw-r--r-- | sshd_config.5 | 711 |
5 files changed, 1356 insertions, 1192 deletions
@@ -35,6 +35,10 @@ | |||
35 | make the monitor sync the transfer ssh1 session key; | 35 | make the monitor sync the transfer ssh1 session key; |
36 | transfer keycontext only for RC4 (this is still depends on EVP | 36 | transfer keycontext only for RC4 (this is still depends on EVP |
37 | implementation details and is broken). | 37 | implementation details and is broken). |
38 | - stevesk@cvs.openbsd.org 2002/06/20 19:56:07 | ||
39 | [ssh.1 sshd.8] | ||
40 | move configuration file options from ssh.1/sshd.8 to | ||
41 | ssh_config.5/sshd_config.5; ok deraadt@ millert@ | ||
38 | - (bal) Cygwin special handling of empty passwords wrong. Patch by | 42 | - (bal) Cygwin special handling of empty passwords wrong. Patch by |
39 | vinschen@redhat.com | 43 | vinschen@redhat.com |
40 | 44 | ||
@@ -965,4 +969,4 @@ | |||
965 | - (stevesk) entropy.c: typo in debug message | 969 | - (stevesk) entropy.c: typo in debug message |
966 | - (djm) ssh-keygen -i needs seeded RNG; report from markus@ | 970 | - (djm) ssh-keygen -i needs seeded RNG; report from markus@ |
967 | 971 | ||
968 | $Id: ChangeLog,v 1.2226 2002/06/21 00:43:42 mouring Exp $ | 972 | $Id: ChangeLog,v 1.2227 2002/06/21 00:59:05 mouring Exp $ |
@@ -34,7 +34,7 @@ | |||
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: ssh.1,v 1.157 2002/06/19 00:27:55 deraadt Exp $ | 37 | .\" $OpenBSD: ssh.1,v 1.158 2002/06/20 19:56:07 stevesk Exp $ |
38 | .Dd September 25, 1999 | 38 | .Dd September 25, 1999 |
39 | .Dt SSH 1 | 39 | .Dt SSH 1 |
40 | .Os | 40 | .Os |
@@ -384,7 +384,7 @@ this mechanism is to prevent man-in-the-middle attacks which could | |||
384 | otherwise be used to circumvent the encryption. | 384 | otherwise be used to circumvent the encryption. |
385 | The | 385 | The |
386 | .Cm StrictHostKeyChecking | 386 | .Cm StrictHostKeyChecking |
387 | option (see below) can be used to prevent logins to machines whose | 387 | option can be used to prevent logins to machines whose |
388 | host key is not known or has changed. | 388 | host key is not known or has changed. |
389 | .Pp | 389 | .Pp |
390 | The options are as follows: | 390 | The options are as follows: |
@@ -568,13 +568,13 @@ and the | |||
568 | .Dq level | 568 | .Dq level |
569 | can be controlled by the | 569 | can be controlled by the |
570 | .Cm CompressionLevel | 570 | .Cm CompressionLevel |
571 | option (see below). | 571 | option. |
572 | Compression is desirable on modem lines and other | 572 | Compression is desirable on modem lines and other |
573 | slow connections, but will only slow down things on fast networks. | 573 | slow connections, but will only slow down things on fast networks. |
574 | The default value can be set on a host-by-host basis in the | 574 | The default value can be set on a host-by-host basis in the |
575 | configuration files; see the | 575 | configuration files; see the |
576 | .Cm Compression | 576 | .Cm Compression |
577 | option below. | 577 | option. |
578 | .It Fl F Ar configfile | 578 | .It Fl F Ar configfile |
579 | Specifies an alternative per-user configuration file. | 579 | Specifies an alternative per-user configuration file. |
580 | If a configuration file is given on the command line, | 580 | If a configuration file is given on the command line, |
@@ -649,547 +649,10 @@ to use IPv6 addresses only. | |||
649 | .El | 649 | .El |
650 | .Sh CONFIGURATION FILES | 650 | .Sh CONFIGURATION FILES |
651 | .Nm | 651 | .Nm |
652 | obtains configuration data from the following sources in | 652 | may additionally obtain configuration data from |
653 | the following order: | 653 | a per-user configuration file and a system-wide configuration file. |
654 | command line options, user's configuration file | 654 | The file format and configuration options are described in |
655 | .Pq Pa $HOME/.ssh/config , | 655 | .Xr ssh_config 5 . |
656 | and system-wide configuration file | ||
657 | .Pq Pa /etc/ssh/ssh_config . | ||
658 | For each parameter, the first obtained value | ||
659 | will be used. | ||
660 | The configuration files contain sections bracketed by | ||
661 | .Dq Host | ||
662 | specifications, and that section is only applied for hosts that | ||
663 | match one of the patterns given in the specification. | ||
664 | The matched host name is the one given on the command line. | ||
665 | .Pp | ||
666 | Since the first obtained value for each parameter is used, more | ||
667 | host-specific declarations should be given near the beginning of the | ||
668 | file, and general defaults at the end. | ||
669 | .Pp | ||
670 | The configuration file has the following format: | ||
671 | .Pp | ||
672 | Empty lines and lines starting with | ||
673 | .Ql # | ||
674 | are comments. | ||
675 | .Pp | ||
676 | Otherwise a line is of the format | ||
677 | .Dq keyword arguments . | ||
678 | Configuration options may be separated by whitespace or | ||
679 | optional whitespace and exactly one | ||
680 | .Ql = ; | ||
681 | the latter format is useful to avoid the need to quote whitespace | ||
682 | when specifying configuration options using the | ||
683 | .Nm ssh , | ||
684 | .Nm scp | ||
685 | and | ||
686 | .Nm sftp | ||
687 | .Fl o | ||
688 | option. | ||
689 | .Pp | ||
690 | The possible | ||
691 | keywords and their meanings are as follows (note that | ||
692 | keywords are case-insensitive and arguments are case-sensitive): | ||
693 | .Bl -tag -width Ds | ||
694 | .It Cm Host | ||
695 | Restricts the following declarations (up to the next | ||
696 | .Cm Host | ||
697 | keyword) to be only for those hosts that match one of the patterns | ||
698 | given after the keyword. | ||
699 | .Ql \&* | ||
700 | and | ||
701 | .Ql ? | ||
702 | can be used as wildcards in the | ||
703 | patterns. | ||
704 | A single | ||
705 | .Ql \&* | ||
706 | as a pattern can be used to provide global | ||
707 | defaults for all hosts. | ||
708 | The host is the | ||
709 | .Ar hostname | ||
710 | argument given on the command line (i.e., the name is not converted to | ||
711 | a canonicalized host name before matching). | ||
712 | .It Cm AFSTokenPassing | ||
713 | Specifies whether to pass AFS tokens to remote host. | ||
714 | The argument to this keyword must be | ||
715 | .Dq yes | ||
716 | or | ||
717 | .Dq no . | ||
718 | This option applies to protocol version 1 only. | ||
719 | .It Cm BatchMode | ||
720 | If set to | ||
721 | .Dq yes , | ||
722 | passphrase/password querying will be disabled. | ||
723 | This option is useful in scripts and other batch jobs where no user | ||
724 | is present to supply the password. | ||
725 | The argument must be | ||
726 | .Dq yes | ||
727 | or | ||
728 | .Dq no . | ||
729 | The default is | ||
730 | .Dq no . | ||
731 | .It Cm BindAddress | ||
732 | Specify the interface to transmit from on machines with multiple | ||
733 | interfaces or aliased addresses. | ||
734 | Note that this option does not work if | ||
735 | .Cm UsePrivilegedPort | ||
736 | is set to | ||
737 | .Dq yes . | ||
738 | .It Cm ChallengeResponseAuthentication | ||
739 | Specifies whether to use challenge response authentication. | ||
740 | The argument to this keyword must be | ||
741 | .Dq yes | ||
742 | or | ||
743 | .Dq no . | ||
744 | The default is | ||
745 | .Dq yes . | ||
746 | .It Cm CheckHostIP | ||
747 | If this flag is set to | ||
748 | .Dq yes , | ||
749 | ssh will additionally check the host IP address in the | ||
750 | .Pa known_hosts | ||
751 | file. | ||
752 | This allows ssh to detect if a host key changed due to DNS spoofing. | ||
753 | If the option is set to | ||
754 | .Dq no , | ||
755 | the check will not be executed. | ||
756 | The default is | ||
757 | .Dq yes . | ||
758 | .It Cm Cipher | ||
759 | Specifies the cipher to use for encrypting the session | ||
760 | in protocol version 1. | ||
761 | Currently, | ||
762 | .Dq blowfish , | ||
763 | .Dq 3des , | ||
764 | and | ||
765 | .Dq des | ||
766 | are supported. | ||
767 | .Ar des | ||
768 | is only supported in the | ||
769 | .Nm | ||
770 | client for interoperability with legacy protocol 1 implementations | ||
771 | that do not support the | ||
772 | .Ar 3des | ||
773 | cipher. Its use is strongly discouraged due to cryptographic | ||
774 | weaknesses. | ||
775 | The default is | ||
776 | .Dq 3des . | ||
777 | .It Cm Ciphers | ||
778 | Specifies the ciphers allowed for protocol version 2 | ||
779 | in order of preference. | ||
780 | Multiple ciphers must be comma-separated. | ||
781 | The default is | ||
782 | .Pp | ||
783 | .Bd -literal | ||
784 | ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour, | ||
785 | aes192-cbc,aes256-cbc'' | ||
786 | .Ed | ||
787 | .It Cm ClearAllForwardings | ||
788 | Specifies that all local, remote and dynamic port forwardings | ||
789 | specified in the configuration files or on the command line be | ||
790 | cleared. This option is primarily useful when used from the | ||
791 | .Nm | ||
792 | command line to clear port forwardings set in | ||
793 | configuration files, and is automatically set by | ||
794 | .Xr scp 1 | ||
795 | and | ||
796 | .Xr sftp 1 . | ||
797 | The argument must be | ||
798 | .Dq yes | ||
799 | or | ||
800 | .Dq no . | ||
801 | The default is | ||
802 | .Dq no . | ||
803 | .It Cm Compression | ||
804 | Specifies whether to use compression. | ||
805 | The argument must be | ||
806 | .Dq yes | ||
807 | or | ||
808 | .Dq no . | ||
809 | The default is | ||
810 | .Dq no . | ||
811 | .It Cm CompressionLevel | ||
812 | Specifies the compression level to use if compression is enabled. | ||
813 | The argument must be an integer from 1 (fast) to 9 (slow, best). | ||
814 | The default level is 6, which is good for most applications. | ||
815 | The meaning of the values is the same as in | ||
816 | .Xr gzip 1 . | ||
817 | Note that this option applies to protocol version 1 only. | ||
818 | .It Cm ConnectionAttempts | ||
819 | Specifies the number of tries (one per second) to make before exiting. | ||
820 | The argument must be an integer. | ||
821 | This may be useful in scripts if the connection sometimes fails. | ||
822 | The default is 1. | ||
823 | .It Cm DynamicForward | ||
824 | Specifies that a TCP/IP port on the local machine be forwarded | ||
825 | over the secure channel, and the application | ||
826 | protocol is then used to determine where to connect to from the | ||
827 | remote machine. The argument must be a port number. | ||
828 | Currently the SOCKS4 protocol is supported, and | ||
829 | .Nm | ||
830 | will act as a SOCKS4 server. | ||
831 | Multiple forwardings may be specified, and | ||
832 | additional forwardings can be given on the command line. Only | ||
833 | the superuser can forward privileged ports. | ||
834 | .It Cm EscapeChar | ||
835 | Sets the escape character (default: | ||
836 | .Ql ~ ) . | ||
837 | The escape character can also | ||
838 | be set on the command line. | ||
839 | The argument should be a single character, | ||
840 | .Ql ^ | ||
841 | followed by a letter, or | ||
842 | .Dq none | ||
843 | to disable the escape | ||
844 | character entirely (making the connection transparent for binary | ||
845 | data). | ||
846 | .It Cm ForwardAgent | ||
847 | Specifies whether the connection to the authentication agent (if any) | ||
848 | will be forwarded to the remote machine. | ||
849 | The argument must be | ||
850 | .Dq yes | ||
851 | or | ||
852 | .Dq no . | ||
853 | The default is | ||
854 | .Dq no . | ||
855 | .It Cm ForwardX11 | ||
856 | Specifies whether X11 connections will be automatically redirected | ||
857 | over the secure channel and | ||
858 | .Ev DISPLAY | ||
859 | set. | ||
860 | The argument must be | ||
861 | .Dq yes | ||
862 | or | ||
863 | .Dq no . | ||
864 | The default is | ||
865 | .Dq no . | ||
866 | .It Cm GatewayPorts | ||
867 | Specifies whether remote hosts are allowed to connect to local | ||
868 | forwarded ports. | ||
869 | By default, | ||
870 | .Nm | ||
871 | binds local port forwardings to the loopback address. This | ||
872 | prevents other remote hosts from connecting to forwarded ports. | ||
873 | .Cm GatewayPorts | ||
874 | can be used to specify that | ||
875 | .Nm | ||
876 | should bind local port forwardings to the wildcard address, | ||
877 | thus allowing remote hosts to connect to forwarded ports. | ||
878 | The argument must be | ||
879 | .Dq yes | ||
880 | or | ||
881 | .Dq no . | ||
882 | The default is | ||
883 | .Dq no . | ||
884 | .It Cm GlobalKnownHostsFile | ||
885 | Specifies a file to use for the global | ||
886 | host key database instead of | ||
887 | .Pa /etc/ssh/ssh_known_hosts . | ||
888 | .It Cm HostbasedAuthentication | ||
889 | Specifies whether to try rhosts based authentication with public key | ||
890 | authentication. | ||
891 | The argument must be | ||
892 | .Dq yes | ||
893 | or | ||
894 | .Dq no . | ||
895 | The default is | ||
896 | .Dq no . | ||
897 | This option applies to protocol version 2 only and | ||
898 | is similar to | ||
899 | .Cm RhostsRSAAuthentication . | ||
900 | .It Cm HostKeyAlgorithms | ||
901 | Specifies the protocol version 2 host key algorithms | ||
902 | that the client wants to use in order of preference. | ||
903 | The default for this option is: | ||
904 | .Dq ssh-rsa,ssh-dss . | ||
905 | .It Cm HostKeyAlias | ||
906 | Specifies an alias that should be used instead of the | ||
907 | real host name when looking up or saving the host key | ||
908 | in the host key database files. | ||
909 | This option is useful for tunneling ssh connections | ||
910 | or for multiple servers running on a single host. | ||
911 | .It Cm HostName | ||
912 | Specifies the real host name to log into. | ||
913 | This can be used to specify nicknames or abbreviations for hosts. | ||
914 | Default is the name given on the command line. | ||
915 | Numeric IP addresses are also permitted (both on the command line and in | ||
916 | .Cm HostName | ||
917 | specifications). | ||
918 | .It Cm IdentityFile | ||
919 | Specifies a file from which the user's RSA or DSA authentication identity | ||
920 | is read. The default is | ||
921 | .Pa $HOME/.ssh/identity | ||
922 | for protocol version 1, and | ||
923 | .Pa $HOME/.ssh/id_rsa | ||
924 | and | ||
925 | .Pa $HOME/.ssh/id_dsa | ||
926 | for protocol version 2. | ||
927 | Additionally, any identities represented by the authentication agent | ||
928 | will be used for authentication. | ||
929 | The file name may use the tilde | ||
930 | syntax to refer to a user's home directory. | ||
931 | It is possible to have | ||
932 | multiple identity files specified in configuration files; all these | ||
933 | identities will be tried in sequence. | ||
934 | .It Cm KeepAlive | ||
935 | Specifies whether the system should send TCP keepalive messages to the | ||
936 | other side. | ||
937 | If they are sent, death of the connection or crash of one | ||
938 | of the machines will be properly noticed. | ||
939 | However, this means that | ||
940 | connections will die if the route is down temporarily, and some people | ||
941 | find it annoying. | ||
942 | .Pp | ||
943 | The default is | ||
944 | .Dq yes | ||
945 | (to send keepalives), and the client will notice | ||
946 | if the network goes down or the remote host dies. | ||
947 | This is important in scripts, and many users want it too. | ||
948 | .Pp | ||
949 | To disable keepalives, the value should be set to | ||
950 | .Dq no . | ||
951 | .It Cm KerberosAuthentication | ||
952 | Specifies whether Kerberos authentication will be used. | ||
953 | The argument to this keyword must be | ||
954 | .Dq yes | ||
955 | or | ||
956 | .Dq no . | ||
957 | .It Cm KerberosTgtPassing | ||
958 | Specifies whether a Kerberos TGT will be forwarded to the server. | ||
959 | This will only work if the Kerberos server is actually an AFS kaserver. | ||
960 | The argument to this keyword must be | ||
961 | .Dq yes | ||
962 | or | ||
963 | .Dq no . | ||
964 | .It Cm LocalForward | ||
965 | Specifies that a TCP/IP port on the local machine be forwarded over | ||
966 | the secure channel to the specified host and port from the remote machine. | ||
967 | The first argument must be a port number, and the second must be | ||
968 | .Ar host:port . | ||
969 | IPv6 addresses can be specified with an alternative syntax: | ||
970 | .Ar host/port . | ||
971 | Multiple forwardings may be specified, and additional | ||
972 | forwardings can be given on the command line. | ||
973 | Only the superuser can forward privileged ports. | ||
974 | .It Cm LogLevel | ||
975 | Gives the verbosity level that is used when logging messages from | ||
976 | .Nm ssh . | ||
977 | The possible values are: | ||
978 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. | ||
979 | The default is INFO. DEBUG and DEBUG1 are equivalent. DEBUG2 | ||
980 | and DEBUG3 each specify higher levels of verbose output. | ||
981 | .It Cm MACs | ||
982 | Specifies the MAC (message authentication code) algorithms | ||
983 | in order of preference. | ||
984 | The MAC algorithm is used in protocol version 2 | ||
985 | for data integrity protection. | ||
986 | Multiple algorithms must be comma-separated. | ||
987 | The default is | ||
988 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . | ||
989 | .It Cm NoHostAuthenticationForLocalhost | ||
990 | This option can be used if the home directory is shared across machines. | ||
991 | In this case localhost will refer to a different machine on each of | ||
992 | the machines and the user will get many warnings about changed host keys. | ||
993 | However, this option disables host authentication for localhost. | ||
994 | The argument to this keyword must be | ||
995 | .Dq yes | ||
996 | or | ||
997 | .Dq no . | ||
998 | The default is to check the host key for localhost. | ||
999 | .It Cm NumberOfPasswordPrompts | ||
1000 | Specifies the number of password prompts before giving up. | ||
1001 | The argument to this keyword must be an integer. | ||
1002 | Default is 3. | ||
1003 | .It Cm PasswordAuthentication | ||
1004 | Specifies whether to use password authentication. | ||
1005 | The argument to this keyword must be | ||
1006 | .Dq yes | ||
1007 | or | ||
1008 | .Dq no . | ||
1009 | The default is | ||
1010 | .Dq yes . | ||
1011 | .It Cm Port | ||
1012 | Specifies the port number to connect on the remote host. | ||
1013 | Default is 22. | ||
1014 | .It Cm PreferredAuthentications | ||
1015 | Specifies the order in which the client should try protocol 2 | ||
1016 | authentication methods. This allows a client to prefer one method (e.g. | ||
1017 | .Cm keyboard-interactive ) | ||
1018 | over another method (e.g. | ||
1019 | .Cm password ) | ||
1020 | The default for this option is: | ||
1021 | .Dq hostbased,publickey,keyboard-interactive,password . | ||
1022 | .It Cm Protocol | ||
1023 | Specifies the protocol versions | ||
1024 | .Nm | ||
1025 | should support in order of preference. | ||
1026 | The possible values are | ||
1027 | .Dq 1 | ||
1028 | and | ||
1029 | .Dq 2 . | ||
1030 | Multiple versions must be comma-separated. | ||
1031 | The default is | ||
1032 | .Dq 2,1 . | ||
1033 | This means that | ||
1034 | .Nm | ||
1035 | tries version 2 and falls back to version 1 | ||
1036 | if version 2 is not available. | ||
1037 | .It Cm ProxyCommand | ||
1038 | Specifies the command to use to connect to the server. | ||
1039 | The command | ||
1040 | string extends to the end of the line, and is executed with | ||
1041 | .Pa /bin/sh . | ||
1042 | In the command string, | ||
1043 | .Ql %h | ||
1044 | will be substituted by the host name to | ||
1045 | connect and | ||
1046 | .Ql %p | ||
1047 | by the port. | ||
1048 | The command can be basically anything, | ||
1049 | and should read from its standard input and write to its standard output. | ||
1050 | It should eventually connect an | ||
1051 | .Xr sshd 8 | ||
1052 | server running on some machine, or execute | ||
1053 | .Ic sshd -i | ||
1054 | somewhere. | ||
1055 | Host key management will be done using the | ||
1056 | HostName of the host being connected (defaulting to the name typed by | ||
1057 | the user). | ||
1058 | Note that | ||
1059 | .Cm CheckHostIP | ||
1060 | is not available for connects with a proxy command. | ||
1061 | .Pp | ||
1062 | .It Cm PubkeyAuthentication | ||
1063 | Specifies whether to try public key authentication. | ||
1064 | The argument to this keyword must be | ||
1065 | .Dq yes | ||
1066 | or | ||
1067 | .Dq no . | ||
1068 | The default is | ||
1069 | .Dq yes . | ||
1070 | This option applies to protocol version 2 only. | ||
1071 | .It Cm RemoteForward | ||
1072 | Specifies that a TCP/IP port on the remote machine be forwarded over | ||
1073 | the secure channel to the specified host and port from the local machine. | ||
1074 | The first argument must be a port number, and the second must be | ||
1075 | .Ar host:port . | ||
1076 | IPv6 addresses can be specified with an alternative syntax: | ||
1077 | .Ar host/port . | ||
1078 | Multiple forwardings may be specified, and additional | ||
1079 | forwardings can be given on the command line. | ||
1080 | Only the superuser can forward privileged ports. | ||
1081 | .It Cm RhostsAuthentication | ||
1082 | Specifies whether to try rhosts based authentication. | ||
1083 | Note that this | ||
1084 | declaration only affects the client side and has no effect whatsoever | ||
1085 | on security. | ||
1086 | Most servers do not permit RhostsAuthentication because it | ||
1087 | is not secure (see | ||
1088 | .Cm RhostsRSAAuthentication ) . | ||
1089 | The argument to this keyword must be | ||
1090 | .Dq yes | ||
1091 | or | ||
1092 | .Dq no . | ||
1093 | The default is | ||
1094 | .Dq no . | ||
1095 | This option applies to protocol version 1 only. | ||
1096 | .It Cm RhostsRSAAuthentication | ||
1097 | Specifies whether to try rhosts based authentication with RSA host | ||
1098 | authentication. | ||
1099 | The argument must be | ||
1100 | .Dq yes | ||
1101 | or | ||
1102 | .Dq no . | ||
1103 | The default is | ||
1104 | .Dq no . | ||
1105 | This option applies to protocol version 1 only and requires | ||
1106 | .Nm | ||
1107 | to be setuid root. | ||
1108 | .It Cm RSAAuthentication | ||
1109 | Specifies whether to try RSA authentication. | ||
1110 | The argument to this keyword must be | ||
1111 | .Dq yes | ||
1112 | or | ||
1113 | .Dq no . | ||
1114 | RSA authentication will only be | ||
1115 | attempted if the identity file exists, or an authentication agent is | ||
1116 | running. | ||
1117 | The default is | ||
1118 | .Dq yes . | ||
1119 | Note that this option applies to protocol version 1 only. | ||
1120 | .It Cm SmartcardDevice | ||
1121 | Specifies which smartcard device to use. The argument to this keyword is | ||
1122 | the device | ||
1123 | .Nm | ||
1124 | should use to communicate with a smartcard used for storing the user's | ||
1125 | private RSA key. By default, no device is specified and smartcard support | ||
1126 | is not activated. | ||
1127 | .It Cm StrictHostKeyChecking | ||
1128 | If this flag is set to | ||
1129 | .Dq yes , | ||
1130 | .Nm | ||
1131 | will never automatically add host keys to the | ||
1132 | .Pa $HOME/.ssh/known_hosts | ||
1133 | file, and refuses to connect to hosts whose host key has changed. | ||
1134 | This provides maximum protection against trojan horse attacks, | ||
1135 | however, can be annoying when the | ||
1136 | .Pa /etc/ssh/ssh_known_hosts | ||
1137 | file is poorly maintained, or connections to new hosts are | ||
1138 | frequently made. | ||
1139 | This option forces the user to manually | ||
1140 | add all new hosts. | ||
1141 | If this flag is set to | ||
1142 | .Dq no , | ||
1143 | .Nm | ||
1144 | will automatically add new host keys to the | ||
1145 | user known hosts files. | ||
1146 | If this flag is set to | ||
1147 | .Dq ask , | ||
1148 | new host keys | ||
1149 | will be added to the user known host files only after the user | ||
1150 | has confirmed that is what they really want to do, and | ||
1151 | .Nm | ||
1152 | will refuse to connect to hosts whose host key has changed. | ||
1153 | The host keys of | ||
1154 | known hosts will be verified automatically in all cases. | ||
1155 | The argument must be | ||
1156 | .Dq yes , | ||
1157 | .Dq no | ||
1158 | or | ||
1159 | .Dq ask . | ||
1160 | The default is | ||
1161 | .Dq ask . | ||
1162 | .It Cm UsePrivilegedPort | ||
1163 | Specifies whether to use a privileged port for outgoing connections. | ||
1164 | The argument must be | ||
1165 | .Dq yes | ||
1166 | or | ||
1167 | .Dq no . | ||
1168 | The default is | ||
1169 | .Dq no . | ||
1170 | Note that this option must be set to | ||
1171 | .Dq yes | ||
1172 | if | ||
1173 | .Cm RhostsAuthentication | ||
1174 | and | ||
1175 | .Cm RhostsRSAAuthentication | ||
1176 | authentications are needed with older servers. | ||
1177 | .It Cm User | ||
1178 | Specifies the user to log in as. | ||
1179 | This can be useful when a different user name is used on different machines. | ||
1180 | This saves the trouble of | ||
1181 | having to remember to give the user name on the command line. | ||
1182 | .It Cm UserKnownHostsFile | ||
1183 | Specifies a file to use for the user | ||
1184 | host key database instead of | ||
1185 | .Pa $HOME/.ssh/known_hosts . | ||
1186 | .It Cm XAuthLocation | ||
1187 | Specifies the location of the | ||
1188 | .Xr xauth 1 | ||
1189 | program. | ||
1190 | The default is | ||
1191 | .Pa /usr/X11R6/bin/xauth . | ||
1192 | .El | ||
1193 | .Sh ENVIRONMENT | 656 | .Sh ENVIRONMENT |
1194 | .Nm | 657 | .Nm |
1195 | will normally set the following environment variables: | 658 | will normally set the following environment variables: |
@@ -1324,13 +787,8 @@ never used automatically and are not necessary; they are only provided for | |||
1324 | the convenience of the user. | 787 | the convenience of the user. |
1325 | .It Pa $HOME/.ssh/config | 788 | .It Pa $HOME/.ssh/config |
1326 | This is the per-user configuration file. | 789 | This is the per-user configuration file. |
1327 | The format of this file is described above. | 790 | The file format and configuration options are described in |
1328 | This file is used by the | 791 | .Xr ssh_config 5 . |
1329 | .Nm | ||
1330 | client. | ||
1331 | This file does not usually contain any sensitive information, | ||
1332 | but the recommended permissions are read/write for the user, and not | ||
1333 | accessible by others. | ||
1334 | .It Pa $HOME/.ssh/authorized_keys | 792 | .It Pa $HOME/.ssh/authorized_keys |
1335 | Lists the public keys (RSA/DSA) that can be used for logging in as this user. | 793 | Lists the public keys (RSA/DSA) that can be used for logging in as this user. |
1336 | The format of this file is described in the | 794 | The format of this file is described in the |
@@ -1365,10 +823,8 @@ checking the key, because someone with access to the name servers | |||
1365 | would then be able to fool host authentication. | 823 | would then be able to fool host authentication. |
1366 | .It Pa /etc/ssh/ssh_config | 824 | .It Pa /etc/ssh/ssh_config |
1367 | Systemwide configuration file. | 825 | Systemwide configuration file. |
1368 | This file provides defaults for those | 826 | The file format and configuration options are described in |
1369 | values that are not specified in the user's configuration file, and | 827 | .Xr ssh_config 5 . |
1370 | for those users who do not have a configuration file. | ||
1371 | This file must be world-readable. | ||
1372 | .It Pa /etc/ssh/ssh_host_key, /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_key | 828 | .It Pa /etc/ssh/ssh_host_key, /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_key |
1373 | These three files contain the private parts of the host keys | 829 | These three files contain the private parts of the host keys |
1374 | and are used for | 830 | and are used for |
@@ -1496,6 +952,7 @@ protocol versions 1.5 and 2.0. | |||
1496 | .Xr ssh-agent 1 , | 952 | .Xr ssh-agent 1 , |
1497 | .Xr ssh-keygen 1 , | 953 | .Xr ssh-keygen 1 , |
1498 | .Xr telnet 1 , | 954 | .Xr telnet 1 , |
955 | .Xr ssh_config 4 , | ||
1499 | .Xr ssh-keysign 8, | 956 | .Xr ssh-keysign 8, |
1500 | .Xr sshd 8 | 957 | .Xr sshd 8 |
1501 | .Rs | 958 | .Rs |
diff --git a/ssh_config.5 b/ssh_config.5 new file mode 100644 index 000000000..53cb0fe97 --- /dev/null +++ b/ssh_config.5 | |||
@@ -0,0 +1,621 @@ | |||
1 | .\" -*- nroff -*- | ||
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 | .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. | ||
14 | .\" Copyright (c) 1999 Aaron Campbell. All rights reserved. | ||
15 | .\" Copyright (c) 1999 Theo de Raadt. All rights reserved. | ||
16 | .\" | ||
17 | .\" Redistribution and use in source and binary forms, with or without | ||
18 | .\" modification, are permitted provided that the following conditions | ||
19 | .\" are met: | ||
20 | .\" 1. Redistributions of source code must retain the above copyright | ||
21 | .\" notice, this list of conditions and the following disclaimer. | ||
22 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
23 | .\" notice, this list of conditions and the following disclaimer in the | ||
24 | .\" documentation and/or other materials provided with the distribution. | ||
25 | .\" | ||
26 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
27 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
28 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
29 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
30 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
31 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
32 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
33 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
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. | ||
36 | .\" | ||
37 | .\" $OpenBSD: ssh_config.5,v 1.1 2002/06/20 19:56:07 stevesk Exp $ | ||
38 | .Dd September 25, 1999 | ||
39 | .Dt SSH_CONFIG 5 | ||
40 | .Os | ||
41 | .Sh NAME | ||
42 | .Nm ssh_config | ||
43 | .Nd OpenSSH SSH client configuration files | ||
44 | .Sh SYNOPSIS | ||
45 | .Bl -tag -width Ds -compact | ||
46 | .It Pa $HOME/.ssh/config | ||
47 | .It Pa /etc/ssh/ssh_config | ||
48 | .El | ||
49 | .Sh DESCRIPTION | ||
50 | .Nm ssh | ||
51 | obtains configuration data from the following sources in | ||
52 | the following order: | ||
53 | command line options, user's configuration file | ||
54 | .Pq Pa $HOME/.ssh/config , | ||
55 | and system-wide configuration file | ||
56 | .Pq Pa /etc/ssh/ssh_config . | ||
57 | .Pp | ||
58 | For each parameter, the first obtained value | ||
59 | will be used. | ||
60 | The configuration files contain sections bracketed by | ||
61 | .Dq Host | ||
62 | specifications, and that section is only applied for hosts that | ||
63 | match one of the patterns given in the specification. | ||
64 | The matched host name is the one given on the command line. | ||
65 | .Pp | ||
66 | Since the first obtained value for each parameter is used, more | ||
67 | host-specific declarations should be given near the beginning of the | ||
68 | file, and general defaults at the end. | ||
69 | .Pp | ||
70 | The configuration file has the following format: | ||
71 | .Pp | ||
72 | Empty lines and lines starting with | ||
73 | .Ql # | ||
74 | are comments. | ||
75 | .Pp | ||
76 | Otherwise a line is of the format | ||
77 | .Dq keyword arguments . | ||
78 | Configuration options may be separated by whitespace or | ||
79 | optional whitespace and exactly one | ||
80 | .Ql = ; | ||
81 | the latter format is useful to avoid the need to quote whitespace | ||
82 | when specifying configuration options using the | ||
83 | .Nm ssh , | ||
84 | .Nm scp | ||
85 | and | ||
86 | .Nm sftp | ||
87 | .Fl o | ||
88 | option. | ||
89 | .Pp | ||
90 | The possible | ||
91 | keywords and their meanings are as follows (note that | ||
92 | keywords are case-insensitive and arguments are case-sensitive): | ||
93 | .Bl -tag -width Ds | ||
94 | .It Cm Host | ||
95 | Restricts the following declarations (up to the next | ||
96 | .Cm Host | ||
97 | keyword) to be only for those hosts that match one of the patterns | ||
98 | given after the keyword. | ||
99 | .Ql \&* | ||
100 | and | ||
101 | .Ql ? | ||
102 | can be used as wildcards in the | ||
103 | patterns. | ||
104 | A single | ||
105 | .Ql \&* | ||
106 | as a pattern can be used to provide global | ||
107 | defaults for all hosts. | ||
108 | The host is the | ||
109 | .Ar hostname | ||
110 | argument given on the command line (i.e., the name is not converted to | ||
111 | a canonicalized host name before matching). | ||
112 | .It Cm AFSTokenPassing | ||
113 | Specifies whether to pass AFS tokens to remote host. | ||
114 | The argument to this keyword must be | ||
115 | .Dq yes | ||
116 | or | ||
117 | .Dq no . | ||
118 | This option applies to protocol version 1 only. | ||
119 | .It Cm BatchMode | ||
120 | If set to | ||
121 | .Dq yes , | ||
122 | passphrase/password querying will be disabled. | ||
123 | This option is useful in scripts and other batch jobs where no user | ||
124 | is present to supply the password. | ||
125 | The argument must be | ||
126 | .Dq yes | ||
127 | or | ||
128 | .Dq no . | ||
129 | The default is | ||
130 | .Dq no . | ||
131 | .It Cm BindAddress | ||
132 | Specify the interface to transmit from on machines with multiple | ||
133 | interfaces or aliased addresses. | ||
134 | Note that this option does not work if | ||
135 | .Cm UsePrivilegedPort | ||
136 | is set to | ||
137 | .Dq yes . | ||
138 | .It Cm ChallengeResponseAuthentication | ||
139 | Specifies whether to use challenge response authentication. | ||
140 | The argument to this keyword must be | ||
141 | .Dq yes | ||
142 | or | ||
143 | .Dq no . | ||
144 | The default is | ||
145 | .Dq yes . | ||
146 | .It Cm CheckHostIP | ||
147 | If this flag is set to | ||
148 | .Dq yes , | ||
149 | ssh will additionally check the host IP address in the | ||
150 | .Pa known_hosts | ||
151 | file. | ||
152 | This allows ssh to detect if a host key changed due to DNS spoofing. | ||
153 | If the option is set to | ||
154 | .Dq no , | ||
155 | the check will not be executed. | ||
156 | The default is | ||
157 | .Dq yes . | ||
158 | .It Cm Cipher | ||
159 | Specifies the cipher to use for encrypting the session | ||
160 | in protocol version 1. | ||
161 | Currently, | ||
162 | .Dq blowfish , | ||
163 | .Dq 3des , | ||
164 | and | ||
165 | .Dq des | ||
166 | are supported. | ||
167 | .Ar des | ||
168 | is only supported in the | ||
169 | .Nm ssh | ||
170 | client for interoperability with legacy protocol 1 implementations | ||
171 | that do not support the | ||
172 | .Ar 3des | ||
173 | cipher. Its use is strongly discouraged due to cryptographic | ||
174 | weaknesses. | ||
175 | The default is | ||
176 | .Dq 3des . | ||
177 | .It Cm Ciphers | ||
178 | Specifies the ciphers allowed for protocol version 2 | ||
179 | in order of preference. | ||
180 | Multiple ciphers must be comma-separated. | ||
181 | The default is | ||
182 | .Pp | ||
183 | .Bd -literal | ||
184 | ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour, | ||
185 | aes192-cbc,aes256-cbc'' | ||
186 | .Ed | ||
187 | .It Cm ClearAllForwardings | ||
188 | Specifies that all local, remote and dynamic port forwardings | ||
189 | specified in the configuration files or on the command line be | ||
190 | cleared. This option is primarily useful when used from the | ||
191 | .Nm ssh | ||
192 | command line to clear port forwardings set in | ||
193 | configuration files, and is automatically set by | ||
194 | .Xr scp 1 | ||
195 | and | ||
196 | .Xr sftp 1 . | ||
197 | The argument must be | ||
198 | .Dq yes | ||
199 | or | ||
200 | .Dq no . | ||
201 | The default is | ||
202 | .Dq no . | ||
203 | .It Cm Compression | ||
204 | Specifies whether to use compression. | ||
205 | The argument must be | ||
206 | .Dq yes | ||
207 | or | ||
208 | .Dq no . | ||
209 | The default is | ||
210 | .Dq no . | ||
211 | .It Cm CompressionLevel | ||
212 | Specifies the compression level to use if compression is enabled. | ||
213 | The argument must be an integer from 1 (fast) to 9 (slow, best). | ||
214 | The default level is 6, which is good for most applications. | ||
215 | The meaning of the values is the same as in | ||
216 | .Xr gzip 1 . | ||
217 | Note that this option applies to protocol version 1 only. | ||
218 | .It Cm ConnectionAttempts | ||
219 | Specifies the number of tries (one per second) to make before exiting. | ||
220 | The argument must be an integer. | ||
221 | This may be useful in scripts if the connection sometimes fails. | ||
222 | The default is 1. | ||
223 | .It Cm DynamicForward | ||
224 | Specifies that a TCP/IP port on the local machine be forwarded | ||
225 | over the secure channel, and the application | ||
226 | protocol is then used to determine where to connect to from the | ||
227 | remote machine. The argument must be a port number. | ||
228 | Currently the SOCKS4 protocol is supported, and | ||
229 | .Nm ssh | ||
230 | will act as a SOCKS4 server. | ||
231 | Multiple forwardings may be specified, and | ||
232 | additional forwardings can be given on the command line. Only | ||
233 | the superuser can forward privileged ports. | ||
234 | .It Cm EscapeChar | ||
235 | Sets the escape character (default: | ||
236 | .Ql ~ ) . | ||
237 | The escape character can also | ||
238 | be set on the command line. | ||
239 | The argument should be a single character, | ||
240 | .Ql ^ | ||
241 | followed by a letter, or | ||
242 | .Dq none | ||
243 | to disable the escape | ||
244 | character entirely (making the connection transparent for binary | ||
245 | data). | ||
246 | .It Cm ForwardAgent | ||
247 | Specifies whether the connection to the authentication agent (if any) | ||
248 | will be forwarded to the remote machine. | ||
249 | The argument must be | ||
250 | .Dq yes | ||
251 | or | ||
252 | .Dq no . | ||
253 | The default is | ||
254 | .Dq no . | ||
255 | .It Cm ForwardX11 | ||
256 | Specifies whether X11 connections will be automatically redirected | ||
257 | over the secure channel and | ||
258 | .Ev DISPLAY | ||
259 | set. | ||
260 | The argument must be | ||
261 | .Dq yes | ||
262 | or | ||
263 | .Dq no . | ||
264 | The default is | ||
265 | .Dq no . | ||
266 | .It Cm GatewayPorts | ||
267 | Specifies whether remote hosts are allowed to connect to local | ||
268 | forwarded ports. | ||
269 | By default, | ||
270 | .Nm ssh | ||
271 | binds local port forwardings to the loopback address. This | ||
272 | prevents other remote hosts from connecting to forwarded ports. | ||
273 | .Cm GatewayPorts | ||
274 | can be used to specify that | ||
275 | .Nm ssh | ||
276 | should bind local port forwardings to the wildcard address, | ||
277 | thus allowing remote hosts to connect to forwarded ports. | ||
278 | The argument must be | ||
279 | .Dq yes | ||
280 | or | ||
281 | .Dq no . | ||
282 | The default is | ||
283 | .Dq no . | ||
284 | .It Cm GlobalKnownHostsFile | ||
285 | Specifies a file to use for the global | ||
286 | host key database instead of | ||
287 | .Pa /etc/ssh/ssh_known_hosts . | ||
288 | .It Cm HostbasedAuthentication | ||
289 | Specifies whether to try rhosts based authentication with public key | ||
290 | authentication. | ||
291 | The argument must be | ||
292 | .Dq yes | ||
293 | or | ||
294 | .Dq no . | ||
295 | The default is | ||
296 | .Dq no . | ||
297 | This option applies to protocol version 2 only and | ||
298 | is similar to | ||
299 | .Cm RhostsRSAAuthentication . | ||
300 | .It Cm HostKeyAlgorithms | ||
301 | Specifies the protocol version 2 host key algorithms | ||
302 | that the client wants to use in order of preference. | ||
303 | The default for this option is: | ||
304 | .Dq ssh-rsa,ssh-dss . | ||
305 | .It Cm HostKeyAlias | ||
306 | Specifies an alias that should be used instead of the | ||
307 | real host name when looking up or saving the host key | ||
308 | in the host key database files. | ||
309 | This option is useful for tunneling ssh connections | ||
310 | or for multiple servers running on a single host. | ||
311 | .It Cm HostName | ||
312 | Specifies the real host name to log into. | ||
313 | This can be used to specify nicknames or abbreviations for hosts. | ||
314 | Default is the name given on the command line. | ||
315 | Numeric IP addresses are also permitted (both on the command line and in | ||
316 | .Cm HostName | ||
317 | specifications). | ||
318 | .It Cm IdentityFile | ||
319 | Specifies a file from which the user's RSA or DSA authentication identity | ||
320 | is read. The default is | ||
321 | .Pa $HOME/.ssh/identity | ||
322 | for protocol version 1, and | ||
323 | .Pa $HOME/.ssh/id_rsa | ||
324 | and | ||
325 | .Pa $HOME/.ssh/id_dsa | ||
326 | for protocol version 2. | ||
327 | Additionally, any identities represented by the authentication agent | ||
328 | will be used for authentication. | ||
329 | The file name may use the tilde | ||
330 | syntax to refer to a user's home directory. | ||
331 | It is possible to have | ||
332 | multiple identity files specified in configuration files; all these | ||
333 | identities will be tried in sequence. | ||
334 | .It Cm KeepAlive | ||
335 | Specifies whether the system should send TCP keepalive messages to the | ||
336 | other side. | ||
337 | If they are sent, death of the connection or crash of one | ||
338 | of the machines will be properly noticed. | ||
339 | However, this means that | ||
340 | connections will die if the route is down temporarily, and some people | ||
341 | find it annoying. | ||
342 | .Pp | ||
343 | The default is | ||
344 | .Dq yes | ||
345 | (to send keepalives), and the client will notice | ||
346 | if the network goes down or the remote host dies. | ||
347 | This is important in scripts, and many users want it too. | ||
348 | .Pp | ||
349 | To disable keepalives, the value should be set to | ||
350 | .Dq no . | ||
351 | .It Cm KerberosAuthentication | ||
352 | Specifies whether Kerberos authentication will be used. | ||
353 | The argument to this keyword must be | ||
354 | .Dq yes | ||
355 | or | ||
356 | .Dq no . | ||
357 | .It Cm KerberosTgtPassing | ||
358 | Specifies whether a Kerberos TGT will be forwarded to the server. | ||
359 | This will only work if the Kerberos server is actually an AFS kaserver. | ||
360 | The argument to this keyword must be | ||
361 | .Dq yes | ||
362 | or | ||
363 | .Dq no . | ||
364 | .It Cm LocalForward | ||
365 | Specifies that a TCP/IP port on the local machine be forwarded over | ||
366 | the secure channel to the specified host and port from the remote machine. | ||
367 | The first argument must be a port number, and the second must be | ||
368 | .Ar host:port . | ||
369 | IPv6 addresses can be specified with an alternative syntax: | ||
370 | .Ar host/port . | ||
371 | Multiple forwardings may be specified, and additional | ||
372 | forwardings can be given on the command line. | ||
373 | Only the superuser can forward privileged ports. | ||
374 | .It Cm LogLevel | ||
375 | Gives the verbosity level that is used when logging messages from | ||
376 | .Nm ssh . | ||
377 | The possible values are: | ||
378 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. | ||
379 | The default is INFO. DEBUG and DEBUG1 are equivalent. DEBUG2 | ||
380 | and DEBUG3 each specify higher levels of verbose output. | ||
381 | .It Cm MACs | ||
382 | Specifies the MAC (message authentication code) algorithms | ||
383 | in order of preference. | ||
384 | The MAC algorithm is used in protocol version 2 | ||
385 | for data integrity protection. | ||
386 | Multiple algorithms must be comma-separated. | ||
387 | The default is | ||
388 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . | ||
389 | .It Cm NoHostAuthenticationForLocalhost | ||
390 | This option can be used if the home directory is shared across machines. | ||
391 | In this case localhost will refer to a different machine on each of | ||
392 | the machines and the user will get many warnings about changed host keys. | ||
393 | However, this option disables host authentication for localhost. | ||
394 | The argument to this keyword must be | ||
395 | .Dq yes | ||
396 | or | ||
397 | .Dq no . | ||
398 | The default is to check the host key for localhost. | ||
399 | .It Cm NumberOfPasswordPrompts | ||
400 | Specifies the number of password prompts before giving up. | ||
401 | The argument to this keyword must be an integer. | ||
402 | Default is 3. | ||
403 | .It Cm PasswordAuthentication | ||
404 | Specifies whether to use password authentication. | ||
405 | The argument to this keyword must be | ||
406 | .Dq yes | ||
407 | or | ||
408 | .Dq no . | ||
409 | The default is | ||
410 | .Dq yes . | ||
411 | .It Cm Port | ||
412 | Specifies the port number to connect on the remote host. | ||
413 | Default is 22. | ||
414 | .It Cm PreferredAuthentications | ||
415 | Specifies the order in which the client should try protocol 2 | ||
416 | authentication methods. This allows a client to prefer one method (e.g. | ||
417 | .Cm keyboard-interactive ) | ||
418 | over another method (e.g. | ||
419 | .Cm password ) | ||
420 | The default for this option is: | ||
421 | .Dq hostbased,publickey,keyboard-interactive,password . | ||
422 | .It Cm Protocol | ||
423 | Specifies the protocol versions | ||
424 | .Nm ssh | ||
425 | should support in order of preference. | ||
426 | The possible values are | ||
427 | .Dq 1 | ||
428 | and | ||
429 | .Dq 2 . | ||
430 | Multiple versions must be comma-separated. | ||
431 | The default is | ||
432 | .Dq 2,1 . | ||
433 | This means that | ||
434 | .Nm ssh | ||
435 | tries version 2 and falls back to version 1 | ||
436 | if version 2 is not available. | ||
437 | .It Cm ProxyCommand | ||
438 | Specifies the command to use to connect to the server. | ||
439 | The command | ||
440 | string extends to the end of the line, and is executed with | ||
441 | .Pa /bin/sh . | ||
442 | In the command string, | ||
443 | .Ql %h | ||
444 | will be substituted by the host name to | ||
445 | connect and | ||
446 | .Ql %p | ||
447 | by the port. | ||
448 | The command can be basically anything, | ||
449 | and should read from its standard input and write to its standard output. | ||
450 | It should eventually connect an | ||
451 | .Xr sshd 8 | ||
452 | server running on some machine, or execute | ||
453 | .Ic sshd -i | ||
454 | somewhere. | ||
455 | Host key management will be done using the | ||
456 | HostName of the host being connected (defaulting to the name typed by | ||
457 | the user). | ||
458 | Note that | ||
459 | .Cm CheckHostIP | ||
460 | is not available for connects with a proxy command. | ||
461 | .Pp | ||
462 | .It Cm PubkeyAuthentication | ||
463 | Specifies whether to try public key authentication. | ||
464 | The argument to this keyword must be | ||
465 | .Dq yes | ||
466 | or | ||
467 | .Dq no . | ||
468 | The default is | ||
469 | .Dq yes . | ||
470 | This option applies to protocol version 2 only. | ||
471 | .It Cm RemoteForward | ||
472 | Specifies that a TCP/IP port on the remote machine be forwarded over | ||
473 | the secure channel to the specified host and port from the local machine. | ||
474 | The first argument must be a port number, and the second must be | ||
475 | .Ar host:port . | ||
476 | IPv6 addresses can be specified with an alternative syntax: | ||
477 | .Ar host/port . | ||
478 | Multiple forwardings may be specified, and additional | ||
479 | forwardings can be given on the command line. | ||
480 | Only the superuser can forward privileged ports. | ||
481 | .It Cm RhostsAuthentication | ||
482 | Specifies whether to try rhosts based authentication. | ||
483 | Note that this | ||
484 | declaration only affects the client side and has no effect whatsoever | ||
485 | on security. | ||
486 | Most servers do not permit RhostsAuthentication because it | ||
487 | is not secure (see | ||
488 | .Cm RhostsRSAAuthentication ) . | ||
489 | The argument to this keyword must be | ||
490 | .Dq yes | ||
491 | or | ||
492 | .Dq no . | ||
493 | The default is | ||
494 | .Dq no . | ||
495 | This option applies to protocol version 1 only. | ||
496 | .It Cm RhostsRSAAuthentication | ||
497 | Specifies whether to try rhosts based authentication with RSA host | ||
498 | authentication. | ||
499 | The argument must be | ||
500 | .Dq yes | ||
501 | or | ||
502 | .Dq no . | ||
503 | The default is | ||
504 | .Dq no . | ||
505 | This option applies to protocol version 1 only and requires | ||
506 | .Nm ssh | ||
507 | to be setuid root. | ||
508 | .It Cm RSAAuthentication | ||
509 | Specifies whether to try RSA authentication. | ||
510 | The argument to this keyword must be | ||
511 | .Dq yes | ||
512 | or | ||
513 | .Dq no . | ||
514 | RSA authentication will only be | ||
515 | attempted if the identity file exists, or an authentication agent is | ||
516 | running. | ||
517 | The default is | ||
518 | .Dq yes . | ||
519 | Note that this option applies to protocol version 1 only. | ||
520 | .It Cm SmartcardDevice | ||
521 | Specifies which smartcard device to use. The argument to this keyword is | ||
522 | the device | ||
523 | .Nm ssh | ||
524 | should use to communicate with a smartcard used for storing the user's | ||
525 | private RSA key. By default, no device is specified and smartcard support | ||
526 | is not activated. | ||
527 | .It Cm StrictHostKeyChecking | ||
528 | If this flag is set to | ||
529 | .Dq yes , | ||
530 | .Nm ssh | ||
531 | will never automatically add host keys to the | ||
532 | .Pa $HOME/.ssh/known_hosts | ||
533 | file, and refuses to connect to hosts whose host key has changed. | ||
534 | This provides maximum protection against trojan horse attacks, | ||
535 | however, can be annoying when the | ||
536 | .Pa /etc/ssh/ssh_known_hosts | ||
537 | file is poorly maintained, or connections to new hosts are | ||
538 | frequently made. | ||
539 | This option forces the user to manually | ||
540 | add all new hosts. | ||
541 | If this flag is set to | ||
542 | .Dq no , | ||
543 | .Nm ssh | ||
544 | will automatically add new host keys to the | ||
545 | user known hosts files. | ||
546 | If this flag is set to | ||
547 | .Dq ask , | ||
548 | new host keys | ||
549 | will be added to the user known host files only after the user | ||
550 | has confirmed that is what they really want to do, and | ||
551 | .Nm ssh | ||
552 | will refuse to connect to hosts whose host key has changed. | ||
553 | The host keys of | ||
554 | known hosts will be verified automatically in all cases. | ||
555 | The argument must be | ||
556 | .Dq yes , | ||
557 | .Dq no | ||
558 | or | ||
559 | .Dq ask . | ||
560 | The default is | ||
561 | .Dq ask . | ||
562 | .It Cm UsePrivilegedPort | ||
563 | Specifies whether to use a privileged port for outgoing connections. | ||
564 | The argument must be | ||
565 | .Dq yes | ||
566 | or | ||
567 | .Dq no . | ||
568 | The default is | ||
569 | .Dq no . | ||
570 | Note that this option must be set to | ||
571 | .Dq yes | ||
572 | if | ||
573 | .Cm RhostsAuthentication | ||
574 | and | ||
575 | .Cm RhostsRSAAuthentication | ||
576 | authentications are needed with older servers. | ||
577 | .It Cm User | ||
578 | Specifies the user to log in as. | ||
579 | This can be useful when a different user name is used on different machines. | ||
580 | This saves the trouble of | ||
581 | having to remember to give the user name on the command line. | ||
582 | .It Cm UserKnownHostsFile | ||
583 | Specifies a file to use for the user | ||
584 | host key database instead of | ||
585 | .Pa $HOME/.ssh/known_hosts . | ||
586 | .It Cm XAuthLocation | ||
587 | Specifies the location of the | ||
588 | .Xr xauth 1 | ||
589 | program. | ||
590 | The default is | ||
591 | .Pa /usr/X11R6/bin/xauth . | ||
592 | .El | ||
593 | .Sh FILES | ||
594 | .Bl -tag -width Ds | ||
595 | .It Pa $HOME/.ssh/config | ||
596 | This is the per-user configuration file. | ||
597 | The format of this file is described above. | ||
598 | This file is used by the | ||
599 | .Nm ssh | ||
600 | client. | ||
601 | This file does not usually contain any sensitive information, | ||
602 | but the recommended permissions are read/write for the user, and not | ||
603 | accessible by others. | ||
604 | .It Pa /etc/ssh/ssh_config | ||
605 | Systemwide configuration file. | ||
606 | This file provides defaults for those | ||
607 | values that are not specified in the user's configuration file, and | ||
608 | for those users who do not have a configuration file. | ||
609 | This file must be world-readable. | ||
610 | .El | ||
611 | .Sh AUTHORS | ||
612 | OpenSSH is a derivative of the original and free | ||
613 | ssh 1.2.12 release by Tatu Ylonen. | ||
614 | Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, | ||
615 | Theo de Raadt and Dug Song | ||
616 | removed many bugs, re-added newer features and | ||
617 | created OpenSSH. | ||
618 | Markus Friedl contributed the support for SSH | ||
619 | protocol versions 1.5 and 2.0. | ||
620 | .Sh SEE ALSO | ||
621 | .Xr ssh 1 | ||
@@ -34,7 +34,7 @@ | |||
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.183 2002/05/29 03:06:30 stevesk Exp $ | 37 | .\" $OpenBSD: sshd.8,v 1.184 2002/06/20 19:56:07 stevesk Exp $ |
38 | .Dd September 25, 1999 | 38 | .Dd September 25, 1999 |
39 | .Dt SSHD 8 | 39 | .Dt SSHD 8 |
40 | .Os | 40 | .Os |
@@ -320,638 +320,8 @@ reads configuration data from | |||
320 | (or the file specified with | 320 | (or the file specified with |
321 | .Fl f | 321 | .Fl f |
322 | on the command line). | 322 | on the command line). |
323 | The file contains keyword-argument pairs, one per line. | 323 | The file format and configuration options are described in |
324 | Lines starting with | 324 | .Xr sshd_config 5 . |
325 | .Ql # | ||
326 | and empty lines are interpreted as comments. | ||
327 | .Pp | ||
328 | The possible | ||
329 | keywords and their meanings are as follows (note that | ||
330 | keywords are case-insensitive and arguments are case-sensitive): | ||
331 | .Bl -tag -width Ds | ||
332 | .It Cm AFSTokenPassing | ||
333 | Specifies whether an AFS token may be forwarded to the server. | ||
334 | Default is | ||
335 | .Dq no . | ||
336 | .It Cm AllowGroups | ||
337 | This keyword can be followed by a list of group name patterns, separated | ||
338 | by spaces. | ||
339 | If specified, login is allowed only for users whose primary | ||
340 | group or supplementary group list matches one of the patterns. | ||
341 | .Ql \&* | ||
342 | and | ||
343 | .Ql ? | ||
344 | can be used as | ||
345 | wildcards in the patterns. | ||
346 | Only group names are valid; a numerical group ID is not recognized. | ||
347 | By default, login is allowed for all groups. | ||
348 | .Pp | ||
349 | .It Cm AllowTcpForwarding | ||
350 | Specifies whether TCP forwarding is permitted. | ||
351 | The default is | ||
352 | .Dq yes . | ||
353 | Note that disabling TCP forwarding does not improve security unless | ||
354 | users are also denied shell access, as they can always install their | ||
355 | own forwarders. | ||
356 | .Pp | ||
357 | .It Cm AllowUsers | ||
358 | This keyword can be followed by a list of user name patterns, separated | ||
359 | by spaces. | ||
360 | If specified, login is allowed only for users names that | ||
361 | match one of the patterns. | ||
362 | .Ql \&* | ||
363 | and | ||
364 | .Ql ? | ||
365 | can be used as | ||
366 | wildcards in the patterns. | ||
367 | Only user names are valid; a numerical user ID is not recognized. | ||
368 | By default, login is allowed for all users. | ||
369 | If the pattern takes the form USER@HOST then USER and HOST | ||
370 | are separately checked, restricting logins to particular | ||
371 | users from particular hosts. | ||
372 | .Pp | ||
373 | .It Cm AuthorizedKeysFile | ||
374 | Specifies the file that contains the public keys that can be used | ||
375 | for user authentication. | ||
376 | .Cm AuthorizedKeysFile | ||
377 | may contain tokens of the form %T which are substituted during connection | ||
378 | set-up. The following tokens are defined: %% is replaced by a literal '%', | ||
379 | %h is replaced by the home directory of the user being authenticated and | ||
380 | %u is replaced by the username of that user. | ||
381 | After expansion, | ||
382 | .Cm AuthorizedKeysFile | ||
383 | is taken to be an absolute path or one relative to the user's home | ||
384 | directory. | ||
385 | The default is | ||
386 | .Dq .ssh/authorized_keys . | ||
387 | .It Cm Banner | ||
388 | In some jurisdictions, sending a warning message before authentication | ||
389 | may be relevant for getting legal protection. | ||
390 | The contents of the specified file are sent to the remote user before | ||
391 | authentication is allowed. | ||
392 | This option is only available for protocol version 2. | ||
393 | By default, no banner is displayed. | ||
394 | .Pp | ||
395 | .It Cm ChallengeResponseAuthentication | ||
396 | Specifies whether challenge response authentication is allowed. | ||
397 | All authentication styles from | ||
398 | .Xr login.conf 5 | ||
399 | are supported. | ||
400 | The default is | ||
401 | .Dq yes . | ||
402 | .It Cm Ciphers | ||
403 | Specifies the ciphers allowed for protocol version 2. | ||
404 | Multiple ciphers must be comma-separated. | ||
405 | The default is | ||
406 | .Pp | ||
407 | .Bd -literal | ||
408 | ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour, | ||
409 | aes192-cbc,aes256-cbc'' | ||
410 | .Ed | ||
411 | .It Cm ClientAliveInterval | ||
412 | Sets a timeout interval in seconds after which if no data has been received | ||
413 | from the client, | ||
414 | .Nm | ||
415 | will send a message through the encrypted | ||
416 | channel to request a response from the client. | ||
417 | The default | ||
418 | is 0, indicating that these messages will not be sent to the client. | ||
419 | This option applies to protocol version 2 only. | ||
420 | .It Cm ClientAliveCountMax | ||
421 | Sets the number of client alive messages (see above) which may be | ||
422 | sent without | ||
423 | .Nm | ||
424 | receiving any messages back from the client. If this threshold is | ||
425 | reached while client alive messages are being sent, | ||
426 | .Nm | ||
427 | will disconnect the client, terminating the session. It is important | ||
428 | to note that the use of client alive messages is very different from | ||
429 | .Cm KeepAlive | ||
430 | (below). The client alive messages are sent through the | ||
431 | encrypted channel and therefore will not be spoofable. The TCP keepalive | ||
432 | option enabled by | ||
433 | .Cm KeepAlive | ||
434 | is spoofable. The client alive mechanism is valuable when the client or | ||
435 | server depend on knowing when a connection has become inactive. | ||
436 | .Pp | ||
437 | The default value is 3. If | ||
438 | .Cm ClientAliveInterval | ||
439 | (above) is set to 15, and | ||
440 | .Cm ClientAliveCountMax | ||
441 | is left at the default, unresponsive ssh clients | ||
442 | will be disconnected after approximately 45 seconds. | ||
443 | .It Cm DenyGroups | ||
444 | This keyword can be followed by a list of group name patterns, separated | ||
445 | by spaces. | ||
446 | Login is disallowed for users whose primary group or supplementary | ||
447 | group list matches one of the patterns. | ||
448 | .Ql \&* | ||
449 | and | ||
450 | .Ql ? | ||
451 | can be used as | ||
452 | wildcards in the patterns. | ||
453 | Only group names are valid; a numerical group ID is not recognized. | ||
454 | By default, login is allowed for all groups. | ||
455 | .Pp | ||
456 | .It Cm DenyUsers | ||
457 | This keyword can be followed by a list of user name patterns, separated | ||
458 | by spaces. | ||
459 | Login is disallowed for user names that match one of the patterns. | ||
460 | .Ql \&* | ||
461 | and | ||
462 | .Ql ? | ||
463 | can be used as wildcards in the patterns. | ||
464 | Only user names are valid; a numerical user ID is not recognized. | ||
465 | By default, login is allowed for all users. | ||
466 | If the pattern takes the form USER@HOST then USER and HOST | ||
467 | are separately checked, restricting logins to particular | ||
468 | users from particular hosts. | ||
469 | .It Cm GatewayPorts | ||
470 | Specifies whether remote hosts are allowed to connect to ports | ||
471 | forwarded for the client. | ||
472 | By default, | ||
473 | .Nm | ||
474 | binds remote port forwardings to the loopback address. This | ||
475 | prevents other remote hosts from connecting to forwarded ports. | ||
476 | .Cm GatewayPorts | ||
477 | can be used to specify that | ||
478 | .Nm | ||
479 | should bind remote port forwardings to the wildcard address, | ||
480 | thus allowing remote hosts to connect to forwarded ports. | ||
481 | The argument must be | ||
482 | .Dq yes | ||
483 | or | ||
484 | .Dq no . | ||
485 | The default is | ||
486 | .Dq no . | ||
487 | .It Cm HostbasedAuthentication | ||
488 | Specifies whether rhosts or /etc/hosts.equiv authentication together | ||
489 | with successful public key client host authentication is allowed | ||
490 | (hostbased authentication). | ||
491 | This option is similar to | ||
492 | .Cm RhostsRSAAuthentication | ||
493 | and applies to protocol version 2 only. | ||
494 | The default is | ||
495 | .Dq no . | ||
496 | .It Cm HostKey | ||
497 | Specifies a file containing a private host key | ||
498 | used by SSH. | ||
499 | The default is | ||
500 | .Pa /etc/ssh/ssh_host_key | ||
501 | for protocol version 1, and | ||
502 | .Pa /etc/ssh/ssh_host_rsa_key | ||
503 | and | ||
504 | .Pa /etc/ssh/ssh_host_dsa_key | ||
505 | for protocol version 2. | ||
506 | Note that | ||
507 | .Nm | ||
508 | will refuse to use a file if it is group/world-accessible. | ||
509 | It is possible to have multiple host key files. | ||
510 | .Dq rsa1 | ||
511 | keys are used for version 1 and | ||
512 | .Dq dsa | ||
513 | or | ||
514 | .Dq rsa | ||
515 | are used for version 2 of the SSH protocol. | ||
516 | .It Cm IgnoreRhosts | ||
517 | Specifies that | ||
518 | .Pa .rhosts | ||
519 | and | ||
520 | .Pa .shosts | ||
521 | files will not be used in | ||
522 | .Cm RhostsAuthentication , | ||
523 | .Cm RhostsRSAAuthentication | ||
524 | or | ||
525 | .Cm HostbasedAuthentication . | ||
526 | .Pp | ||
527 | .Pa /etc/hosts.equiv | ||
528 | and | ||
529 | .Pa /etc/shosts.equiv | ||
530 | are still used. | ||
531 | The default is | ||
532 | .Dq yes . | ||
533 | .It Cm IgnoreUserKnownHosts | ||
534 | Specifies whether | ||
535 | .Nm | ||
536 | should ignore the user's | ||
537 | .Pa $HOME/.ssh/known_hosts | ||
538 | during | ||
539 | .Cm RhostsRSAAuthentication | ||
540 | or | ||
541 | .Cm HostbasedAuthentication . | ||
542 | The default is | ||
543 | .Dq no . | ||
544 | .It Cm KeepAlive | ||
545 | Specifies whether the system should send TCP keepalive messages to the | ||
546 | other side. | ||
547 | If they are sent, death of the connection or crash of one | ||
548 | of the machines will be properly noticed. | ||
549 | However, this means that | ||
550 | connections will die if the route is down temporarily, and some people | ||
551 | find it annoying. | ||
552 | On the other hand, if keepalives are not sent, | ||
553 | sessions may hang indefinitely on the server, leaving | ||
554 | .Dq ghost | ||
555 | users and consuming server resources. | ||
556 | .Pp | ||
557 | The default is | ||
558 | .Dq yes | ||
559 | (to send keepalives), and the server will notice | ||
560 | if the network goes down or the client host crashes. | ||
561 | This avoids infinitely hanging sessions. | ||
562 | .Pp | ||
563 | To disable keepalives, the value should be set to | ||
564 | .Dq no . | ||
565 | .It Cm KerberosAuthentication | ||
566 | Specifies whether Kerberos authentication is allowed. | ||
567 | This can be in the form of a Kerberos ticket, or if | ||
568 | .Cm PasswordAuthentication | ||
569 | is yes, the password provided by the user will be validated through | ||
570 | the Kerberos KDC. | ||
571 | To use this option, the server needs a | ||
572 | Kerberos servtab which allows the verification of the KDC's identity. | ||
573 | Default is | ||
574 | .Dq no . | ||
575 | .It Cm KerberosOrLocalPasswd | ||
576 | If set then if password authentication through Kerberos fails then | ||
577 | the password will be validated via any additional local mechanism | ||
578 | such as | ||
579 | .Pa /etc/passwd . | ||
580 | Default is | ||
581 | .Dq yes . | ||
582 | .It Cm KerberosTgtPassing | ||
583 | Specifies whether a Kerberos TGT may be forwarded to the server. | ||
584 | Default is | ||
585 | .Dq no , | ||
586 | as this only works when the Kerberos KDC is actually an AFS kaserver. | ||
587 | .It Cm KerberosTicketCleanup | ||
588 | Specifies whether to automatically destroy the user's ticket cache | ||
589 | file on logout. | ||
590 | Default is | ||
591 | .Dq yes . | ||
592 | .It Cm KeyRegenerationInterval | ||
593 | In protocol version 1, the ephemeral server key is automatically regenerated | ||
594 | after this many seconds (if it has been used). | ||
595 | The purpose of regeneration is to prevent | ||
596 | decrypting captured sessions by later breaking into the machine and | ||
597 | stealing the keys. | ||
598 | The key is never stored anywhere. | ||
599 | If the value is 0, the key is never regenerated. | ||
600 | The default is 3600 (seconds). | ||
601 | .It Cm ListenAddress | ||
602 | Specifies the local addresses | ||
603 | .Nm | ||
604 | should listen on. | ||
605 | The following forms may be used: | ||
606 | .Pp | ||
607 | .Bl -item -offset indent -compact | ||
608 | .It | ||
609 | .Cm ListenAddress | ||
610 | .Sm off | ||
611 | .Ar host No | Ar IPv4_addr No | Ar IPv6_addr | ||
612 | .Sm on | ||
613 | .It | ||
614 | .Cm ListenAddress | ||
615 | .Sm off | ||
616 | .Ar host No | Ar IPv4_addr No : Ar port | ||
617 | .Sm on | ||
618 | .It | ||
619 | .Cm ListenAddress | ||
620 | .Sm off | ||
621 | .Oo | ||
622 | .Ar host No | Ar IPv6_addr Oc : Ar port | ||
623 | .Sm on | ||
624 | .El | ||
625 | .Pp | ||
626 | If | ||
627 | .Ar port | ||
628 | is not specified, | ||
629 | .Nm | ||
630 | will listen on the address and all prior | ||
631 | .Cm Port | ||
632 | options specified. The default is to listen on all local | ||
633 | addresses. Multiple | ||
634 | .Cm ListenAddress | ||
635 | options are permitted. Additionally, any | ||
636 | .Cm Port | ||
637 | options must precede this option for non port qualified addresses. | ||
638 | .It Cm LoginGraceTime | ||
639 | The server disconnects after this time if the user has not | ||
640 | successfully logged in. | ||
641 | If the value is 0, there is no time limit. | ||
642 | The default is 600 (seconds). | ||
643 | .It Cm LogLevel | ||
644 | Gives the verbosity level that is used when logging messages from | ||
645 | .Nm sshd . | ||
646 | The possible values are: | ||
647 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. | ||
648 | The default is INFO. DEBUG and DEBUG1 are equivalent. DEBUG2 | ||
649 | and DEBUG3 each specify higher levels of debugging output. | ||
650 | Logging with a DEBUG level violates the privacy of users | ||
651 | and is not recommended. | ||
652 | .It Cm MACs | ||
653 | Specifies the available MAC (message authentication code) algorithms. | ||
654 | The MAC algorithm is used in protocol version 2 | ||
655 | for data integrity protection. | ||
656 | Multiple algorithms must be comma-separated. | ||
657 | The default is | ||
658 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . | ||
659 | .It Cm MaxStartups | ||
660 | Specifies the maximum number of concurrent unauthenticated connections to the | ||
661 | .Nm | ||
662 | daemon. | ||
663 | Additional connections will be dropped until authentication succeeds or the | ||
664 | .Cm LoginGraceTime | ||
665 | expires for a connection. | ||
666 | The default is 10. | ||
667 | .Pp | ||
668 | Alternatively, random early drop can be enabled by specifying | ||
669 | the three colon separated values | ||
670 | .Dq start:rate:full | ||
671 | (e.g., "10:30:60"). | ||
672 | .Nm | ||
673 | will refuse connection attempts with a probability of | ||
674 | .Dq rate/100 | ||
675 | (30%) | ||
676 | if there are currently | ||
677 | .Dq start | ||
678 | (10) | ||
679 | unauthenticated connections. | ||
680 | The probability increases linearly and all connection attempts | ||
681 | are refused if the number of unauthenticated connections reaches | ||
682 | .Dq full | ||
683 | (60). | ||
684 | .It Cm PAMAuthenticationViaKbdInt | ||
685 | Specifies whether PAM challenge response authentication is allowed. This | ||
686 | allows the use of most PAM challenge response authentication modules, but | ||
687 | it will allow password authentication regardless of whether | ||
688 | .Cm PasswordAuthentication | ||
689 | is disabled. | ||
690 | The default is | ||
691 | .Dq no . | ||
692 | .It Cm PasswordAuthentication | ||
693 | Specifies whether password authentication is allowed. | ||
694 | The default is | ||
695 | .Dq yes . | ||
696 | .It Cm PermitEmptyPasswords | ||
697 | When password authentication is allowed, it specifies whether the | ||
698 | server allows login to accounts with empty password strings. | ||
699 | The default is | ||
700 | .Dq no . | ||
701 | .It Cm PermitRootLogin | ||
702 | Specifies whether root can login using | ||
703 | .Xr ssh 1 . | ||
704 | The argument must be | ||
705 | .Dq yes , | ||
706 | .Dq without-password , | ||
707 | .Dq forced-commands-only | ||
708 | or | ||
709 | .Dq no . | ||
710 | The default is | ||
711 | .Dq yes . | ||
712 | .Pp | ||
713 | If this option is set to | ||
714 | .Dq without-password | ||
715 | password authentication is disabled for root. | ||
716 | .Pp | ||
717 | If this option is set to | ||
718 | .Dq forced-commands-only | ||
719 | root login with public key authentication will be allowed, | ||
720 | but only if the | ||
721 | .Ar command | ||
722 | option has been specified | ||
723 | (which may be useful for taking remote backups even if root login is | ||
724 | normally not allowed). All other authentication methods are disabled | ||
725 | for root. | ||
726 | .Pp | ||
727 | If this option is set to | ||
728 | .Dq no | ||
729 | root is not allowed to login. | ||
730 | .It Cm PidFile | ||
731 | Specifies the file that contains the process identifier of the | ||
732 | .Nm | ||
733 | daemon. | ||
734 | The default is | ||
735 | .Pa /var/run/sshd.pid . | ||
736 | .It Cm Port | ||
737 | Specifies the port number that | ||
738 | .Nm | ||
739 | listens on. | ||
740 | The default is 22. | ||
741 | Multiple options of this type are permitted. | ||
742 | See also | ||
743 | .Cm ListenAddress . | ||
744 | .It Cm PrintLastLog | ||
745 | Specifies whether | ||
746 | .Nm | ||
747 | should print the date and time when the user last logged in. | ||
748 | The default is | ||
749 | .Dq yes . | ||
750 | .It Cm PrintMotd | ||
751 | Specifies whether | ||
752 | .Nm | ||
753 | should print | ||
754 | .Pa /etc/motd | ||
755 | when a user logs in interactively. | ||
756 | (On some systems it is also printed by the shell, | ||
757 | .Pa /etc/profile , | ||
758 | or equivalent.) | ||
759 | The default is | ||
760 | .Dq yes . | ||
761 | .It Cm Protocol | ||
762 | Specifies the protocol versions | ||
763 | .Nm | ||
764 | should support. | ||
765 | The possible values are | ||
766 | .Dq 1 | ||
767 | and | ||
768 | .Dq 2 . | ||
769 | Multiple versions must be comma-separated. | ||
770 | The default is | ||
771 | .Dq 2,1 . | ||
772 | .It Cm PubkeyAuthentication | ||
773 | Specifies whether public key authentication is allowed. | ||
774 | The default is | ||
775 | .Dq yes . | ||
776 | Note that this option applies to protocol version 2 only. | ||
777 | .It Cm RhostsAuthentication | ||
778 | Specifies whether authentication using rhosts or /etc/hosts.equiv | ||
779 | files is sufficient. | ||
780 | Normally, this method should not be permitted because it is insecure. | ||
781 | .Cm RhostsRSAAuthentication | ||
782 | should be used | ||
783 | instead, because it performs RSA-based host authentication in addition | ||
784 | to normal rhosts or /etc/hosts.equiv authentication. | ||
785 | The default is | ||
786 | .Dq no . | ||
787 | This option applies to protocol version 1 only. | ||
788 | .It Cm RhostsRSAAuthentication | ||
789 | Specifies whether rhosts or /etc/hosts.equiv authentication together | ||
790 | with successful RSA host authentication is allowed. | ||
791 | The default is | ||
792 | .Dq no . | ||
793 | This option applies to protocol version 1 only. | ||
794 | .It Cm RSAAuthentication | ||
795 | Specifies whether pure RSA authentication is allowed. | ||
796 | The default is | ||
797 | .Dq yes . | ||
798 | This option applies to protocol version 1 only. | ||
799 | .It Cm ServerKeyBits | ||
800 | Defines the number of bits in the ephemeral protocol version 1 server key. | ||
801 | The minimum value is 512, and the default is 768. | ||
802 | .It Cm StrictModes | ||
803 | Specifies whether | ||
804 | .Nm | ||
805 | should check file modes and ownership of the | ||
806 | user's files and home directory before accepting login. | ||
807 | This is normally desirable because novices sometimes accidentally leave their | ||
808 | directory or files world-writable. | ||
809 | The default is | ||
810 | .Dq yes . | ||
811 | .It Cm Subsystem | ||
812 | Configures an external subsystem (e.g., file transfer daemon). | ||
813 | Arguments should be a subsystem name and a command to execute upon subsystem | ||
814 | request. | ||
815 | The command | ||
816 | .Xr sftp-server 8 | ||
817 | implements the | ||
818 | .Dq sftp | ||
819 | file transfer subsystem. | ||
820 | By default no subsystems are defined. | ||
821 | Note that this option applies to protocol version 2 only. | ||
822 | .It Cm SyslogFacility | ||
823 | Gives the facility code that is used when logging messages from | ||
824 | .Nm sshd . | ||
825 | The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, | ||
826 | LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. | ||
827 | The default is AUTH. | ||
828 | .It Cm UseLogin | ||
829 | Specifies whether | ||
830 | .Xr login 1 | ||
831 | is used for interactive login sessions. | ||
832 | The default is | ||
833 | .Dq no . | ||
834 | Note that | ||
835 | .Xr login 1 | ||
836 | is never used for remote command execution. | ||
837 | Note also, that if this is enabled, | ||
838 | .Cm X11Forwarding | ||
839 | will be disabled because | ||
840 | .Xr login 1 | ||
841 | does not know how to handle | ||
842 | .Xr xauth 1 | ||
843 | cookies. If | ||
844 | .Cm UsePrivilegeSeparation | ||
845 | is specified, it will be disabled after authentication. | ||
846 | .It Cm UsePrivilegeSeparation | ||
847 | Specifies whether | ||
848 | .Nm | ||
849 | separated privileges by creating an unprivileged child process | ||
850 | to deal with incoming network traffic. After successful authentication, | ||
851 | another process will be created that has the privilege of the authenticated | ||
852 | user. The goal of privilege separation is to prevent privilege | ||
853 | escalation by containing any corruption within the unprivileged processes. | ||
854 | The default is | ||
855 | .Dq yes . | ||
856 | .It Cm VerifyReverseMapping | ||
857 | Specifies whether | ||
858 | .Nm | ||
859 | should try to verify the remote host name and check that | ||
860 | the resolved host name for the remote IP address maps back to the | ||
861 | very same IP address. | ||
862 | The default is | ||
863 | .Dq no . | ||
864 | .It Cm X11DisplayOffset | ||
865 | Specifies the first display number available for | ||
866 | .Nm sshd Ns 's | ||
867 | X11 forwarding. | ||
868 | This prevents | ||
869 | .Nm | ||
870 | from interfering with real X11 servers. | ||
871 | The default is 10. | ||
872 | .It Cm X11Forwarding | ||
873 | Specifies whether X11 forwarding is permitted. | ||
874 | The default is | ||
875 | .Dq no . | ||
876 | Note that disabling X11 forwarding does not improve security in any | ||
877 | way, as users can always install their own forwarders. | ||
878 | X11 forwarding is automatically disabled if | ||
879 | .Cm UseLogin | ||
880 | is enabled. | ||
881 | .It Cm X11UseLocalhost | ||
882 | Specifies whether | ||
883 | .Nm | ||
884 | should bind the X11 forwarding server to the loopback address or to | ||
885 | the wildcard address. By default, | ||
886 | .Nm | ||
887 | binds the forwarding server to the loopback address and sets the | ||
888 | hostname part of the | ||
889 | .Ev DISPLAY | ||
890 | environment variable to | ||
891 | .Dq localhost . | ||
892 | This prevents remote hosts from connecting to the fake display. | ||
893 | However, some older X11 clients may not function with this | ||
894 | configuration. | ||
895 | .Cm X11UseLocalhost | ||
896 | may be set to | ||
897 | .Dq no | ||
898 | to specify that the forwarding server should be bound to the wildcard | ||
899 | address. | ||
900 | The argument must be | ||
901 | .Dq yes | ||
902 | or | ||
903 | .Dq no . | ||
904 | The default is | ||
905 | .Dq yes . | ||
906 | .It Cm XAuthLocation | ||
907 | Specifies the location of the | ||
908 | .Xr xauth 1 | ||
909 | program. | ||
910 | The default is | ||
911 | .Pa /usr/X11R6/bin/xauth . | ||
912 | .El | ||
913 | .Ss Time Formats | ||
914 | .Pp | ||
915 | .Nm | ||
916 | command-line arguments and configuration file options that specify time | ||
917 | may be expressed using a sequence of the form: | ||
918 | .Sm off | ||
919 | .Ar time Oo Ar qualifier Oc , | ||
920 | .Sm on | ||
921 | where | ||
922 | .Ar time | ||
923 | is a positive integer value and | ||
924 | .Ar qualifier | ||
925 | is one of the following: | ||
926 | .Pp | ||
927 | .Bl -tag -width Ds -compact -offset indent | ||
928 | .It Cm <none> | ||
929 | seconds | ||
930 | .It Cm s | Cm S | ||
931 | seconds | ||
932 | .It Cm m | Cm M | ||
933 | minutes | ||
934 | .It Cm h | Cm H | ||
935 | hours | ||
936 | .It Cm d | Cm D | ||
937 | days | ||
938 | .It Cm w | Cm W | ||
939 | weeks | ||
940 | .El | ||
941 | .Pp | ||
942 | Each member of the sequence is added together to calculate | ||
943 | the total time value. | ||
944 | .Pp | ||
945 | Time format examples: | ||
946 | .Pp | ||
947 | .Bl -tag -width Ds -compact -offset indent | ||
948 | .It 600 | ||
949 | 600 seconds (10 minutes) | ||
950 | .It 10m | ||
951 | 10 minutes | ||
952 | .It 1h30m | ||
953 | 1 hour 30 minutes (90 minutes) | ||
954 | .El | ||
955 | .Sh LOGIN PROCESS | 325 | .Sh LOGIN PROCESS |
956 | When a user successfully logs in, | 326 | When a user successfully logs in, |
957 | .Nm | 327 | .Nm |
@@ -1187,8 +557,8 @@ cvs.openbsd.org,199.185.137.3 ssh-rsa AAAA1234.....= | |||
1187 | .It Pa /etc/ssh/sshd_config | 557 | .It Pa /etc/ssh/sshd_config |
1188 | Contains configuration data for | 558 | Contains configuration data for |
1189 | .Nm sshd . | 559 | .Nm sshd . |
1190 | This file should be writable by root only, but it is recommended | 560 | The file format and configuration options are described in |
1191 | (though not necessary) that it be world-readable. | 561 | .Xr sshd_config 5 . |
1192 | .It Pa /etc/ssh/ssh_host_key, /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_key | 562 | .It Pa /etc/ssh/ssh_host_key, /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_key |
1193 | These three files contain the private parts of the host keys. | 563 | These three files contain the private parts of the host keys. |
1194 | These files should only be owned by root, readable only by root, and not | 564 | These files should only be owned by root, readable only by root, and not |
@@ -1389,6 +759,7 @@ for privilege separation. | |||
1389 | .Xr ssh-keygen 1 , | 759 | .Xr ssh-keygen 1 , |
1390 | .Xr login.conf 5 , | 760 | .Xr login.conf 5 , |
1391 | .Xr moduli 5 , | 761 | .Xr moduli 5 , |
762 | .Xr sshd_config 5 , | ||
1392 | .Xr sftp-server 8 | 763 | .Xr sftp-server 8 |
1393 | .Rs | 764 | .Rs |
1394 | .%A T. Ylonen | 765 | .%A T. Ylonen |
diff --git a/sshd_config.5 b/sshd_config.5 new file mode 100644 index 000000000..1aecd485b --- /dev/null +++ b/sshd_config.5 | |||
@@ -0,0 +1,711 @@ | |||
1 | .\" -*- nroff -*- | ||
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 | .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. | ||
14 | .\" Copyright (c) 1999 Aaron Campbell. All rights reserved. | ||
15 | .\" Copyright (c) 1999 Theo de Raadt. All rights reserved. | ||
16 | .\" | ||
17 | .\" Redistribution and use in source and binary forms, with or without | ||
18 | .\" modification, are permitted provided that the following conditions | ||
19 | .\" are met: | ||
20 | .\" 1. Redistributions of source code must retain the above copyright | ||
21 | .\" notice, this list of conditions and the following disclaimer. | ||
22 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
23 | .\" notice, this list of conditions and the following disclaimer in the | ||
24 | .\" documentation and/or other materials provided with the distribution. | ||
25 | .\" | ||
26 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
27 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
28 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
29 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
30 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
31 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
32 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
33 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
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. | ||
36 | .\" | ||
37 | .\" $OpenBSD: sshd_config.5,v 1.3 2002/06/20 23:37:12 markus Exp $ | ||
38 | .Dd September 25, 1999 | ||
39 | .Dt SSHD_CONFIG 5 | ||
40 | .Os | ||
41 | .Sh NAME | ||
42 | .Nm sshd_config | ||
43 | .Nd OpenSSH SSH daemon configuration file | ||
44 | .Sh SYNOPSIS | ||
45 | .Bl -tag -width Ds -compact | ||
46 | .It Pa /etc/ssh/sshd_config | ||
47 | .El | ||
48 | .Sh DESCRIPTION | ||
49 | .Nm sshd | ||
50 | reads configuration data from | ||
51 | .Pa /etc/ssh/sshd_config | ||
52 | (or the file specified with | ||
53 | .Fl f | ||
54 | on the command line). | ||
55 | The file contains keyword-argument pairs, one per line. | ||
56 | Lines starting with | ||
57 | .Ql # | ||
58 | and empty lines are interpreted as comments. | ||
59 | .Pp | ||
60 | The possible | ||
61 | keywords and their meanings are as follows (note that | ||
62 | keywords are case-insensitive and arguments are case-sensitive): | ||
63 | .Bl -tag -width Ds | ||
64 | .It Cm AFSTokenPassing | ||
65 | Specifies whether an AFS token may be forwarded to the server. | ||
66 | Default is | ||
67 | .Dq no . | ||
68 | .It Cm AllowGroups | ||
69 | This keyword can be followed by a list of group name patterns, separated | ||
70 | by spaces. | ||
71 | If specified, login is allowed only for users whose primary | ||
72 | group or supplementary group list matches one of the patterns. | ||
73 | .Ql \&* | ||
74 | and | ||
75 | .Ql ? | ||
76 | can be used as | ||
77 | wildcards in the patterns. | ||
78 | Only group names are valid; a numerical group ID is not recognized. | ||
79 | By default, login is allowed for all groups. | ||
80 | .Pp | ||
81 | .It Cm AllowTcpForwarding | ||
82 | Specifies whether TCP forwarding is permitted. | ||
83 | The default is | ||
84 | .Dq yes . | ||
85 | Note that disabling TCP forwarding does not improve security unless | ||
86 | users are also denied shell access, as they can always install their | ||
87 | own forwarders. | ||
88 | .Pp | ||
89 | .It Cm AllowUsers | ||
90 | This keyword can be followed by a list of user name patterns, separated | ||
91 | by spaces. | ||
92 | If specified, login is allowed only for users names that | ||
93 | match one of the patterns. | ||
94 | .Ql \&* | ||
95 | and | ||
96 | .Ql ? | ||
97 | can be used as | ||
98 | wildcards in the patterns. | ||
99 | Only user names are valid; a numerical user ID is not recognized. | ||
100 | By default, login is allowed for all users. | ||
101 | If the pattern takes the form USER@HOST then USER and HOST | ||
102 | are separately checked, restricting logins to particular | ||
103 | users from particular hosts. | ||
104 | .Pp | ||
105 | .It Cm AuthorizedKeysFile | ||
106 | Specifies the file that contains the public keys that can be used | ||
107 | for user authentication. | ||
108 | .Cm AuthorizedKeysFile | ||
109 | may contain tokens of the form %T which are substituted during connection | ||
110 | set-up. The following tokens are defined: %% is replaced by a literal '%', | ||
111 | %h is replaced by the home directory of the user being authenticated and | ||
112 | %u is replaced by the username of that user. | ||
113 | After expansion, | ||
114 | .Cm AuthorizedKeysFile | ||
115 | is taken to be an absolute path or one relative to the user's home | ||
116 | directory. | ||
117 | The default is | ||
118 | .Dq .ssh/authorized_keys . | ||
119 | .It Cm Banner | ||
120 | In some jurisdictions, sending a warning message before authentication | ||
121 | may be relevant for getting legal protection. | ||
122 | The contents of the specified file are sent to the remote user before | ||
123 | authentication is allowed. | ||
124 | This option is only available for protocol version 2. | ||
125 | By default, no banner is displayed. | ||
126 | .Pp | ||
127 | .It Cm ChallengeResponseAuthentication | ||
128 | Specifies whether challenge response authentication is allowed. | ||
129 | All authentication styles from | ||
130 | .Xr login.conf 5 | ||
131 | are supported. | ||
132 | The default is | ||
133 | .Dq yes . | ||
134 | .It Cm Ciphers | ||
135 | Specifies the ciphers allowed for protocol version 2. | ||
136 | Multiple ciphers must be comma-separated. | ||
137 | The default is | ||
138 | .Pp | ||
139 | .Bd -literal | ||
140 | ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour, | ||
141 | aes192-cbc,aes256-cbc'' | ||
142 | .Ed | ||
143 | .It Cm ClientAliveInterval | ||
144 | Sets a timeout interval in seconds after which if no data has been received | ||
145 | from the client, | ||
146 | .Nm sshd | ||
147 | will send a message through the encrypted | ||
148 | channel to request a response from the client. | ||
149 | The default | ||
150 | is 0, indicating that these messages will not be sent to the client. | ||
151 | This option applies to protocol version 2 only. | ||
152 | .It Cm ClientAliveCountMax | ||
153 | Sets the number of client alive messages (see above) which may be | ||
154 | sent without | ||
155 | .Nm sshd | ||
156 | receiving any messages back from the client. If this threshold is | ||
157 | reached while client alive messages are being sent, | ||
158 | .Nm sshd | ||
159 | will disconnect the client, terminating the session. It is important | ||
160 | to note that the use of client alive messages is very different from | ||
161 | .Cm KeepAlive | ||
162 | (below). The client alive messages are sent through the | ||
163 | encrypted channel and therefore will not be spoofable. The TCP keepalive | ||
164 | option enabled by | ||
165 | .Cm KeepAlive | ||
166 | is spoofable. The client alive mechanism is valuable when the client or | ||
167 | server depend on knowing when a connection has become inactive. | ||
168 | .Pp | ||
169 | The default value is 3. If | ||
170 | .Cm ClientAliveInterval | ||
171 | (above) is set to 15, and | ||
172 | .Cm ClientAliveCountMax | ||
173 | is left at the default, unresponsive ssh clients | ||
174 | will be disconnected after approximately 45 seconds. | ||
175 | .It Cm Compression | ||
176 | Specifies whether compression is allowed. | ||
177 | The argument must be | ||
178 | .Dq yes | ||
179 | or | ||
180 | .Dq no . | ||
181 | The default is | ||
182 | .Dq yes . | ||
183 | .It Cm DenyGroups | ||
184 | This keyword can be followed by a list of group name patterns, separated | ||
185 | by spaces. | ||
186 | Login is disallowed for users whose primary group or supplementary | ||
187 | group list matches one of the patterns. | ||
188 | .Ql \&* | ||
189 | and | ||
190 | .Ql ? | ||
191 | can be used as | ||
192 | wildcards in the patterns. | ||
193 | Only group names are valid; a numerical group ID is not recognized. | ||
194 | By default, login is allowed for all groups. | ||
195 | .Pp | ||
196 | .It Cm DenyUsers | ||
197 | This keyword can be followed by a list of user name patterns, separated | ||
198 | by spaces. | ||
199 | Login is disallowed for user names that match one of the patterns. | ||
200 | .Ql \&* | ||
201 | and | ||
202 | .Ql ? | ||
203 | can be used as wildcards in the patterns. | ||
204 | Only user names are valid; a numerical user ID is not recognized. | ||
205 | By default, login is allowed for all users. | ||
206 | If the pattern takes the form USER@HOST then USER and HOST | ||
207 | are separately checked, restricting logins to particular | ||
208 | users from particular hosts. | ||
209 | .It Cm GatewayPorts | ||
210 | Specifies whether remote hosts are allowed to connect to ports | ||
211 | forwarded for the client. | ||
212 | By default, | ||
213 | .Nm sshd | ||
214 | binds remote port forwardings to the loopback address. This | ||
215 | prevents other remote hosts from connecting to forwarded ports. | ||
216 | .Cm GatewayPorts | ||
217 | can be used to specify that | ||
218 | .Nm sshd | ||
219 | should bind remote port forwardings to the wildcard address, | ||
220 | thus allowing remote hosts to connect to forwarded ports. | ||
221 | The argument must be | ||
222 | .Dq yes | ||
223 | or | ||
224 | .Dq no . | ||
225 | The default is | ||
226 | .Dq no . | ||
227 | .It Cm HostbasedAuthentication | ||
228 | Specifies whether rhosts or /etc/hosts.equiv authentication together | ||
229 | with successful public key client host authentication is allowed | ||
230 | (hostbased authentication). | ||
231 | This option is similar to | ||
232 | .Cm RhostsRSAAuthentication | ||
233 | and applies to protocol version 2 only. | ||
234 | The default is | ||
235 | .Dq no . | ||
236 | .It Cm HostKey | ||
237 | Specifies a file containing a private host key | ||
238 | used by SSH. | ||
239 | The default is | ||
240 | .Pa /etc/ssh/ssh_host_key | ||
241 | for protocol version 1, and | ||
242 | .Pa /etc/ssh/ssh_host_rsa_key | ||
243 | and | ||
244 | .Pa /etc/ssh/ssh_host_dsa_key | ||
245 | for protocol version 2. | ||
246 | Note that | ||
247 | .Nm sshd | ||
248 | will refuse to use a file if it is group/world-accessible. | ||
249 | It is possible to have multiple host key files. | ||
250 | .Dq rsa1 | ||
251 | keys are used for version 1 and | ||
252 | .Dq dsa | ||
253 | or | ||
254 | .Dq rsa | ||
255 | are used for version 2 of the SSH protocol. | ||
256 | .It Cm IgnoreRhosts | ||
257 | Specifies that | ||
258 | .Pa .rhosts | ||
259 | and | ||
260 | .Pa .shosts | ||
261 | files will not be used in | ||
262 | .Cm RhostsAuthentication , | ||
263 | .Cm RhostsRSAAuthentication | ||
264 | or | ||
265 | .Cm HostbasedAuthentication . | ||
266 | .Pp | ||
267 | .Pa /etc/hosts.equiv | ||
268 | and | ||
269 | .Pa /etc/shosts.equiv | ||
270 | are still used. | ||
271 | The default is | ||
272 | .Dq yes . | ||
273 | .It Cm IgnoreUserKnownHosts | ||
274 | Specifies whether | ||
275 | .Nm sshd | ||
276 | should ignore the user's | ||
277 | .Pa $HOME/.ssh/known_hosts | ||
278 | during | ||
279 | .Cm RhostsRSAAuthentication | ||
280 | or | ||
281 | .Cm HostbasedAuthentication . | ||
282 | The default is | ||
283 | .Dq no . | ||
284 | .It Cm KeepAlive | ||
285 | Specifies whether the system should send TCP keepalive messages to the | ||
286 | other side. | ||
287 | If they are sent, death of the connection or crash of one | ||
288 | of the machines will be properly noticed. | ||
289 | However, this means that | ||
290 | connections will die if the route is down temporarily, and some people | ||
291 | find it annoying. | ||
292 | On the other hand, if keepalives are not sent, | ||
293 | sessions may hang indefinitely on the server, leaving | ||
294 | .Dq ghost | ||
295 | users and consuming server resources. | ||
296 | .Pp | ||
297 | The default is | ||
298 | .Dq yes | ||
299 | (to send keepalives), and the server will notice | ||
300 | if the network goes down or the client host crashes. | ||
301 | This avoids infinitely hanging sessions. | ||
302 | .Pp | ||
303 | To disable keepalives, the value should be set to | ||
304 | .Dq no . | ||
305 | .It Cm KerberosAuthentication | ||
306 | Specifies whether Kerberos authentication is allowed. | ||
307 | This can be in the form of a Kerberos ticket, or if | ||
308 | .It Cm PAMAuthenticationViaKbdInt | ||
309 | Specifies whether PAM challenge response authentication is allowed. This | ||
310 | allows the use of most PAM challenge response authentication modules, but | ||
311 | it will allow password authentication regardless of whether | ||
312 | .Cm PasswordAuthentication | ||
313 | is yes, the password provided by the user will be validated through | ||
314 | the Kerberos KDC. | ||
315 | To use this option, the server needs a | ||
316 | Kerberos servtab which allows the verification of the KDC's identity. | ||
317 | Default is | ||
318 | .Dq no . | ||
319 | .It Cm KerberosOrLocalPasswd | ||
320 | If set then if password authentication through Kerberos fails then | ||
321 | the password will be validated via any additional local mechanism | ||
322 | such as | ||
323 | .Pa /etc/passwd . | ||
324 | Default is | ||
325 | .Dq yes . | ||
326 | .It Cm KerberosTgtPassing | ||
327 | Specifies whether a Kerberos TGT may be forwarded to the server. | ||
328 | Default is | ||
329 | .Dq no , | ||
330 | as this only works when the Kerberos KDC is actually an AFS kaserver. | ||
331 | .It Cm KerberosTicketCleanup | ||
332 | Specifies whether to automatically destroy the user's ticket cache | ||
333 | file on logout. | ||
334 | Default is | ||
335 | .Dq yes . | ||
336 | .It Cm KeyRegenerationInterval | ||
337 | In protocol version 1, the ephemeral server key is automatically regenerated | ||
338 | after this many seconds (if it has been used). | ||
339 | The purpose of regeneration is to prevent | ||
340 | decrypting captured sessions by later breaking into the machine and | ||
341 | stealing the keys. | ||
342 | The key is never stored anywhere. | ||
343 | If the value is 0, the key is never regenerated. | ||
344 | The default is 3600 (seconds). | ||
345 | .It Cm ListenAddress | ||
346 | Specifies the local addresses | ||
347 | .Nm sshd | ||
348 | should listen on. | ||
349 | The following forms may be used: | ||
350 | .Pp | ||
351 | .Bl -item -offset indent -compact | ||
352 | .It | ||
353 | .Cm ListenAddress | ||
354 | .Sm off | ||
355 | .Ar host No | Ar IPv4_addr No | Ar IPv6_addr | ||
356 | .Sm on | ||
357 | .It | ||
358 | .Cm ListenAddress | ||
359 | .Sm off | ||
360 | .Ar host No | Ar IPv4_addr No : Ar port | ||
361 | .Sm on | ||
362 | .It | ||
363 | .Cm ListenAddress | ||
364 | .Sm off | ||
365 | .Oo | ||
366 | .Ar host No | Ar IPv6_addr Oc : Ar port | ||
367 | .Sm on | ||
368 | .El | ||
369 | .Pp | ||
370 | If | ||
371 | .Ar port | ||
372 | is not specified, | ||
373 | .Nm sshd | ||
374 | will listen on the address and all prior | ||
375 | .Cm Port | ||
376 | options specified. The default is to listen on all local | ||
377 | addresses. Multiple | ||
378 | .Cm ListenAddress | ||
379 | options are permitted. Additionally, any | ||
380 | .Cm Port | ||
381 | options must precede this option for non port qualified addresses. | ||
382 | .It Cm LoginGraceTime | ||
383 | The server disconnects after this time if the user has not | ||
384 | successfully logged in. | ||
385 | If the value is 0, there is no time limit. | ||
386 | The default is 600 (seconds). | ||
387 | .It Cm LogLevel | ||
388 | Gives the verbosity level that is used when logging messages from | ||
389 | .Nm sshd . | ||
390 | The possible values are: | ||
391 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. | ||
392 | The default is INFO. DEBUG and DEBUG1 are equivalent. DEBUG2 | ||
393 | and DEBUG3 each specify higher levels of debugging output. | ||
394 | Logging with a DEBUG level violates the privacy of users | ||
395 | and is not recommended. | ||
396 | .It Cm MACs | ||
397 | Specifies the available MAC (message authentication code) algorithms. | ||
398 | The MAC algorithm is used in protocol version 2 | ||
399 | for data integrity protection. | ||
400 | Multiple algorithms must be comma-separated. | ||
401 | The default is | ||
402 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . | ||
403 | .It Cm MaxStartups | ||
404 | Specifies the maximum number of concurrent unauthenticated connections to the | ||
405 | .Nm sshd | ||
406 | daemon. | ||
407 | Additional connections will be dropped until authentication succeeds or the | ||
408 | .Cm LoginGraceTime | ||
409 | expires for a connection. | ||
410 | The default is 10. | ||
411 | .Pp | ||
412 | Alternatively, random early drop can be enabled by specifying | ||
413 | the three colon separated values | ||
414 | .Dq start:rate:full | ||
415 | (e.g., "10:30:60"). | ||
416 | .Nm sshd | ||
417 | will refuse connection attempts with a probability of | ||
418 | .Dq rate/100 | ||
419 | (30%) | ||
420 | if there are currently | ||
421 | .Dq start | ||
422 | (10) | ||
423 | unauthenticated connections. | ||
424 | The probability increases linearly and all connection attempts | ||
425 | are refused if the number of unauthenticated connections reaches | ||
426 | .Dq full | ||
427 | (60). | ||
428 | .It Cm PasswordAuthentication | ||
429 | Specifies whether password authentication is allowed. | ||
430 | The default is | ||
431 | .Dq yes . | ||
432 | .It Cm PermitEmptyPasswords | ||
433 | When password authentication is allowed, it specifies whether the | ||
434 | server allows login to accounts with empty password strings. | ||
435 | The default is | ||
436 | .Dq no . | ||
437 | .It Cm PermitRootLogin | ||
438 | Specifies whether root can login using | ||
439 | .Xr ssh 1 . | ||
440 | The argument must be | ||
441 | .Dq yes , | ||
442 | .Dq without-password , | ||
443 | .Dq forced-commands-only | ||
444 | or | ||
445 | .Dq no . | ||
446 | The default is | ||
447 | .Dq yes . | ||
448 | .Pp | ||
449 | If this option is set to | ||
450 | .Dq without-password | ||
451 | password authentication is disabled for root. | ||
452 | .Pp | ||
453 | If this option is set to | ||
454 | .Dq forced-commands-only | ||
455 | root login with public key authentication will be allowed, | ||
456 | but only if the | ||
457 | .Ar command | ||
458 | option has been specified | ||
459 | (which may be useful for taking remote backups even if root login is | ||
460 | normally not allowed). All other authentication methods are disabled | ||
461 | for root. | ||
462 | .Pp | ||
463 | If this option is set to | ||
464 | .Dq no | ||
465 | root is not allowed to login. | ||
466 | .It Cm PidFile | ||
467 | Specifies the file that contains the process identifier of the | ||
468 | .Nm sshd | ||
469 | daemon. | ||
470 | The default is | ||
471 | .Pa /var/run/sshd.pid . | ||
472 | .It Cm Port | ||
473 | Specifies the port number that | ||
474 | .Nm sshd | ||
475 | listens on. | ||
476 | The default is 22. | ||
477 | Multiple options of this type are permitted. | ||
478 | See also | ||
479 | .Cm ListenAddress . | ||
480 | .It Cm PrintLastLog | ||
481 | Specifies whether | ||
482 | .Nm sshd | ||
483 | should print the date and time when the user last logged in. | ||
484 | The default is | ||
485 | .Dq yes . | ||
486 | .It Cm PrintMotd | ||
487 | Specifies whether | ||
488 | .Nm sshd | ||
489 | should print | ||
490 | .Pa /etc/motd | ||
491 | when a user logs in interactively. | ||
492 | (On some systems it is also printed by the shell, | ||
493 | .Pa /etc/profile , | ||
494 | or equivalent.) | ||
495 | The default is | ||
496 | .Dq yes . | ||
497 | .It Cm Protocol | ||
498 | Specifies the protocol versions | ||
499 | .Nm sshd | ||
500 | should support. | ||
501 | The possible values are | ||
502 | .Dq 1 | ||
503 | and | ||
504 | .Dq 2 . | ||
505 | Multiple versions must be comma-separated. | ||
506 | The default is | ||
507 | .Dq 2,1 . | ||
508 | .It Cm PubkeyAuthentication | ||
509 | Specifies whether public key authentication is allowed. | ||
510 | The default is | ||
511 | .Dq yes . | ||
512 | Note that this option applies to protocol version 2 only. | ||
513 | .It Cm RhostsAuthentication | ||
514 | Specifies whether authentication using rhosts or /etc/hosts.equiv | ||
515 | files is sufficient. | ||
516 | Normally, this method should not be permitted because it is insecure. | ||
517 | .Cm RhostsRSAAuthentication | ||
518 | should be used | ||
519 | instead, because it performs RSA-based host authentication in addition | ||
520 | to normal rhosts or /etc/hosts.equiv authentication. | ||
521 | The default is | ||
522 | .Dq no . | ||
523 | This option applies to protocol version 1 only. | ||
524 | .It Cm RhostsRSAAuthentication | ||
525 | Specifies whether rhosts or /etc/hosts.equiv authentication together | ||
526 | with successful RSA host authentication is allowed. | ||
527 | The default is | ||
528 | .Dq no . | ||
529 | This option applies to protocol version 1 only. | ||
530 | .It Cm RSAAuthentication | ||
531 | Specifies whether pure RSA authentication is allowed. | ||
532 | The default is | ||
533 | .Dq yes . | ||
534 | This option applies to protocol version 1 only. | ||
535 | .It Cm ServerKeyBits | ||
536 | Defines the number of bits in the ephemeral protocol version 1 server key. | ||
537 | The minimum value is 512, and the default is 768. | ||
538 | .It Cm StrictModes | ||
539 | Specifies whether | ||
540 | .Nm sshd | ||
541 | should check file modes and ownership of the | ||
542 | user's files and home directory before accepting login. | ||
543 | This is normally desirable because novices sometimes accidentally leave their | ||
544 | directory or files world-writable. | ||
545 | The default is | ||
546 | .Dq yes . | ||
547 | .It Cm Subsystem | ||
548 | Configures an external subsystem (e.g., file transfer daemon). | ||
549 | Arguments should be a subsystem name and a command to execute upon subsystem | ||
550 | request. | ||
551 | The command | ||
552 | .Xr sftp-server 8 | ||
553 | implements the | ||
554 | .Dq sftp | ||
555 | file transfer subsystem. | ||
556 | By default no subsystems are defined. | ||
557 | Note that this option applies to protocol version 2 only. | ||
558 | .It Cm SyslogFacility | ||
559 | Gives the facility code that is used when logging messages from | ||
560 | .Nm sshd . | ||
561 | The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, | ||
562 | LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. | ||
563 | The default is AUTH. | ||
564 | .It Cm UseLogin | ||
565 | Specifies whether | ||
566 | .Xr login 1 | ||
567 | is used for interactive login sessions. | ||
568 | The default is | ||
569 | .Dq no . | ||
570 | Note that | ||
571 | .Xr login 1 | ||
572 | is never used for remote command execution. | ||
573 | Note also, that if this is enabled, | ||
574 | .Cm X11Forwarding | ||
575 | will be disabled because | ||
576 | .Xr login 1 | ||
577 | does not know how to handle | ||
578 | .Xr xauth 1 | ||
579 | cookies. If | ||
580 | .Cm UsePrivilegeSeparation | ||
581 | is specified, it will be disabled after authentication. | ||
582 | .It Cm UsePrivilegeSeparation | ||
583 | Specifies whether | ||
584 | .Nm sshd | ||
585 | separates privileges by creating an unprivileged child process | ||
586 | to deal with incoming network traffic. After successful authentication, | ||
587 | another process will be created that has the privilege of the authenticated | ||
588 | user. The goal of privilege separation is to prevent privilege | ||
589 | escalation by containing any corruption within the unprivileged processes. | ||
590 | The default is | ||
591 | .Dq yes . | ||
592 | .It Cm VerifyReverseMapping | ||
593 | Specifies whether | ||
594 | .Nm sshd | ||
595 | should try to verify the remote host name and check that | ||
596 | the resolved host name for the remote IP address maps back to the | ||
597 | very same IP address. | ||
598 | The default is | ||
599 | .Dq no . | ||
600 | .It Cm X11DisplayOffset | ||
601 | Specifies the first display number available for | ||
602 | .Nm sshd Ns 's | ||
603 | X11 forwarding. | ||
604 | This prevents | ||
605 | .Nm sshd | ||
606 | from interfering with real X11 servers. | ||
607 | The default is 10. | ||
608 | .It Cm X11Forwarding | ||
609 | Specifies whether X11 forwarding is permitted. | ||
610 | The default is | ||
611 | .Dq no . | ||
612 | Note that disabling X11 forwarding does not improve security in any | ||
613 | way, as users can always install their own forwarders. | ||
614 | X11 forwarding is automatically disabled if | ||
615 | .Cm UseLogin | ||
616 | is enabled. | ||
617 | .It Cm X11UseLocalhost | ||
618 | Specifies whether | ||
619 | .Nm sshd | ||
620 | should bind the X11 forwarding server to the loopback address or to | ||
621 | the wildcard address. By default, | ||
622 | .Nm sshd | ||
623 | binds the forwarding server to the loopback address and sets the | ||
624 | hostname part of the | ||
625 | .Ev DISPLAY | ||
626 | environment variable to | ||
627 | .Dq localhost . | ||
628 | This prevents remote hosts from connecting to the fake display. | ||
629 | However, some older X11 clients may not function with this | ||
630 | configuration. | ||
631 | .Cm X11UseLocalhost | ||
632 | may be set to | ||
633 | .Dq no | ||
634 | to specify that the forwarding server should be bound to the wildcard | ||
635 | address. | ||
636 | The argument must be | ||
637 | .Dq yes | ||
638 | or | ||
639 | .Dq no . | ||
640 | The default is | ||
641 | .Dq yes . | ||
642 | .It Cm XAuthLocation | ||
643 | Specifies the location of the | ||
644 | .Xr xauth 1 | ||
645 | program. | ||
646 | The default is | ||
647 | .Pa /usr/X11R6/bin/xauth . | ||
648 | .El | ||
649 | .Ss Time Formats | ||
650 | .Pp | ||
651 | .Nm sshd | ||
652 | command-line arguments and configuration file options that specify time | ||
653 | may be expressed using a sequence of the form: | ||
654 | .Sm off | ||
655 | .Ar time Oo Ar qualifier Oc , | ||
656 | .Sm on | ||
657 | where | ||
658 | .Ar time | ||
659 | is a positive integer value and | ||
660 | .Ar qualifier | ||
661 | is one of the following: | ||
662 | .Pp | ||
663 | .Bl -tag -width Ds -compact -offset indent | ||
664 | .It Cm <none> | ||
665 | seconds | ||
666 | .It Cm s | Cm S | ||
667 | seconds | ||
668 | .It Cm m | Cm M | ||
669 | minutes | ||
670 | .It Cm h | Cm H | ||
671 | hours | ||
672 | .It Cm d | Cm D | ||
673 | days | ||
674 | .It Cm w | Cm W | ||
675 | weeks | ||
676 | .El | ||
677 | .Pp | ||
678 | Each member of the sequence is added together to calculate | ||
679 | the total time value. | ||
680 | .Pp | ||
681 | Time format examples: | ||
682 | .Pp | ||
683 | .Bl -tag -width Ds -compact -offset indent | ||
684 | .It 600 | ||
685 | 600 seconds (10 minutes) | ||
686 | .It 10m | ||
687 | 10 minutes | ||
688 | .It 1h30m | ||
689 | 1 hour 30 minutes (90 minutes) | ||
690 | .El | ||
691 | .Sh FILES | ||
692 | .Bl -tag -width Ds | ||
693 | .It Pa /etc/ssh/sshd_config | ||
694 | Contains configuration data for | ||
695 | .Nm sshd . | ||
696 | This file should be writable by root only, but it is recommended | ||
697 | (though not necessary) that it be world-readable. | ||
698 | .El | ||
699 | .Sh AUTHORS | ||
700 | OpenSSH is a derivative of the original and free | ||
701 | ssh 1.2.12 release by Tatu Ylonen. | ||
702 | Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, | ||
703 | Theo de Raadt and Dug Song | ||
704 | removed many bugs, re-added newer features and | ||
705 | created OpenSSH. | ||
706 | Markus Friedl contributed the support for SSH | ||
707 | protocol versions 1.5 and 2.0. | ||
708 | Niels Provos and Markus Friedl contributed support | ||
709 | for privilege separation. | ||
710 | .Sh SEE ALSO | ||
711 | .Xr sshd 8 | ||