📄 sshd_config.0
字号:
LoginGraceTime The server disconnects after this time if the user has not sucM-- cessfully logged in. If the value is 0, there is no time limit. The default is 600 (seconds). LogLevel Gives the verbosity level that is used when logging messages from sshd. The possible values are: QUIET, FATAL, ERROR, INFO, VERM-- BOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. The default is INFO. DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify higher levels of debugging output. Logging with a DEBUG level violates the privacy of users and is not recommended. MACs Specifies the available MAC (message authentication code) algoM-- rithms. The MAC algorithm is used in protocol version 2 for data integrity protection. Multiple algorithms must be comma-sepaM-- rated. The default is ``hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96''. MaxStartups Specifies the maximum number of concurrent unauthenticated conM-- nections to the sshd daemon. Additional connections will be dropped until authentication succeeds or the LoginGraceTime expires for a connection. The default is 10. Alternatively, random early drop can be enabled by specifying the three colon separated values ``start:rate:full'' (e.g., "10:30:60"). sshd will refuse connection attempts with a probaM-- bility of ``rate/100'' (30%) if there are currently ``start'' (10) unauthenticated connections. The probability increases linM-- early and all connection attempts are refused if the number of unauthenticated connections reaches ``full'' (60). PasswordAuthentication Specifies whether password authentication is allowed. The default is ``yes''. PermitEmptyPasswords When password authentication is allowed, it specifies whether the server allows login to accounts with empty password strings. The default is ``no''. PermitRootLogin Specifies whether root can login using ssh(1). The argument must be ``yes'', ``without-password'', ``forced-commands-only'' or ``no''. The default is ``yes''. If this option is set to ``without-password'' password authentiM-- cation is disabled for root. If this option is set to ``forced-commands-only'' root login with public key authentication will be allowed, but only if the command option has been specified (which may be useful for taking remote backups even if root login is normally not allowed). All other authentication methods are disabled for root. If this option is set to ``no'' root is not allowed to login. PidFile Specifies the file that contains the process identifier of the sshd daemon. The default is /var/run/sshd.pid. Port Specifies the port number that sshd listens on. The default is 22. Multiple options of this type are permitted. See also ListenAddress. PrintLastLog Specifies whether sshd should print the date and time when the user last logged in. The default is ``yes''. PrintMotd Specifies whether sshd should print /etc/motd when a user logs in interactively. (On some systems it is also printed by the shell, /etc/profile, or equivalent.) The default is ``yes''. Protocol Specifies the protocol versions sshd should support. The possiM-- ble values are ``1'' and ``2''. Multiple versions must be comma- separated. The default is ``2,1''. PubkeyAuthentication Specifies whether public key authentication is allowed. The default is ``yes''. Note that this option applies to protocol version 2 only. RhostsAuthentication Specifies whether authentication using rhosts or /etc/hosts.equiv files is sufficient. Normally, this method should not be permitM-- ted because it is insecure. RhostsRSAAuthentication should be used instead, because it performs RSA-based host authentication in addition to normal rhosts or /etc/hosts.equiv authentication. The default is ``no''. This option applies to protocol version 1 only. RhostsRSAAuthentication Specifies whether rhosts or /etc/hosts.equiv authentication together with successful RSA host authentication is allowed. The default is ``no''. This option applies to protocol version 1 only. RSAAuthentication Specifies whether pure RSA authentication is allowed. The default is ``yes''. This option applies to protocol version 1 only. ServerKeyBits Defines the number of bits in the ephemeral protocol version 1 server key. The minimum value is 512, and the default is 768. StrictModes Specifies whether sshd should check file modes and ownership of the user's files and home directory before accepting login. This is normally desirable because novices sometimes accidentally leave their directory or files world-writable. The default is ``yes''. Subsystem Configures an external subsystem (e.g., file transfer daemon). Arguments should be a subsystem name and a command to execute upon subsystem request. The command sftp-server(8) implements the ``sftp'' file transfer subsystem. By default no subsystems are defined. Note that this option applies to protocol version 2 only. SyslogFacility Gives the facility code that is used when logging messages from sshd. The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The default is AUTH. UseLogin Specifies whether login(1) is used for interactive login sesM-- sions. The default is ``no''. Note that login(1) is never used for remote command execution. Note also, that if this is enabled, X11Forwarding will be disabled because login(1) does not know how to handle xauth(1) cookies. If UsePrivilegeSeparation is specified, it will be disabled after authentication. UsePrivilegeSeparation Specifies whether sshd separates privileges by creating an unprivileged child process to deal with incoming network traffic. After successful authentication, another process will be created that has the privilege of the authenticated user. The goal of privilege separation is to prevent privilege escalation by conM-- taining any corruption within the unprivileged processes. The default is ``yes''. VerifyReverseMapping Specifies whether sshd should try to verify the remote host name and check that the resolved host name for the remote IP address maps back to the very same IP address. The default is ``no''. X11DisplayOffset Specifies the first display number available for sshd's X11 forM-- warding. This prevents sshd from interfering with real X11 servers. The default is 10. X11Forwarding Specifies whether X11 forwarding is permitted. The default is ``no''. Note that disabling X11 forwarding does not improve security in any way, as users can always install their own forM-- warders. X11 forwarding is automatically disabled if UseLogin is enabled. X11UseLocalhost Specifies whether sshd should bind the X11 forwarding server to the loopback address or to the wildcard address. By default, sshd binds the forwarding server to the loopback address and sets the hostname part of the DISPLAY environment variable to ``localhost''. This prevents remote hosts from connecting to the fake display. However, some older X11 clients may not function with this configuration. X11UseLocalhost may be set to ``no'' to specify that the forwarding server should be bound to the wildM-- card address. The argument must be ``yes'' or ``no''. The default is ``yes''. XAuthLocation Specifies the location of the xauth(1) program. The default is /usr/X11R6/bin/xauth. Time Formats sshd command-line arguments and configuration file options that specify time may be expressed using a sequence of the form: time[qualifier], where time is a positive integer value and qualifier is one of the folM-- lowing: <none> seconds s | S seconds m | M minutes h | H hours d | D days w | W weeks Each member of the sequence is added together to calculate the total time value. Time format examples: 600 600 seconds (10 minutes) 10m 10 minutes 1h30m 1 hour 30 minutes (90 minutes)FILES /etc/ssh/sshd_config Contains configuration data for sshd. This file should be writable by root only, but it is recommended (though not necesM-- sary) that it be world-readable.AUTHORS OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt and Dug Song removed many bugs, re-added newer features and creM-- ated OpenSSH. Markus Friedl contributed the support for SSH protocol versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support for privilege separation.SEE ALSO sshd(8)BSD September 25, 1999 BSD
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -