⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssh_config.5

📁 OpenSSH 是 SSH (Secure SHell) 协议的免费开源实现。它用安全、加密的网络连接工具代替了 telnet、ftp、 rlogin、rsh 和 rcp 工具。OpenSSH 支持
💻 5
📖 第 1 页 / 共 2 页
字号:
or for multiple servers running on a single host..It Cm HostNameSpecifies the real host name to log into.This can be used to specify nicknames or abbreviations for hosts.Default is the name given on the command line.Numeric IP addresses are also permitted (both on the command line and in.Cm HostNamespecifications)..It Cm IdentityFileSpecifies a file from which the user's RSA or DSA authentication identityis read.The default is.Pa $HOME/.ssh/identityfor protocol version 1, and.Pa $HOME/.ssh/id_rsaand.Pa $HOME/.ssh/id_dsafor protocol version 2.Additionally, any identities represented by the authentication agentwill be used for authentication.The file name may use the tildesyntax to refer to a user's home directory.It is possible to havemultiple identity files specified in configuration files; all theseidentities will be tried in sequence..It Cm IdentitiesOnlySpecifies that.Nm sshshould only use the authentication identity files configured in the.Nmfiles,even if the.Nm ssh-agentoffers more identities.The argument to this keyword must be.Dq yesor.Dq no .This option is intented for situations where.Nm ssh-agentoffers many different identities.The default is.Dq no ..It Cm KbdInteractiveDevicesSpecifies the list of methods to use in keyboard-interactive authentication.Multiple method names must be comma-separated.The default is to use the server specified list..It Cm LocalForwardSpecifies that a TCP/IP port on the local machine be forwarded overthe secure channel to the specified host and port from the remote machine.The first argument must be a port number, and the second must be.Xo.Sm off.Oo Ar bind_address : Oc.Ar host : port.Sm on.Xc .IPv6 addresses can be specified by enclosing addresses in square brackets orby using an alternative syntax:.Sm off.Xo.Op Ar bind_address No /.Ar host No / Ar port.Xc ..Sm onMultiple forwardings may be specified, and additional forwardings can begiven on the command line.Only the superuser can forward privileged ports.By default, the local port is bound in accordance with the.Cm GatewayPortssetting.However, an explicit.Ar bind_addressmay be used to bind the connection to a specific address.The.Ar bind_addressof.Dq localhostindicates that the listening port be bound for local use only, while anempty address or.Sq *indicates that the port should be available from all interfaces..It Cm LogLevelGives the verbosity level that is used when logging messages from.Nm ssh .The possible values are:QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3.The default is INFO.DEBUG and DEBUG1 are equivalent.DEBUG2 and DEBUG3 each specify higher levels of verbose output..It Cm MACsSpecifies the MAC (message authentication code) algorithmsin order of preference.The MAC algorithm is used in protocol version 2for data integrity protection.Multiple algorithms must be comma-separated.The default is.Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 ..It Cm NoHostAuthenticationForLocalhostThis option can be used if the home directory is shared across machines.In this case localhost will refer to a different machine on each ofthe machines and the user will get many warnings about changed host keys.However, this option disables host authentication for localhost.The argument to this keyword must be.Dq yesor.Dq no .The default is to check the host key for localhost..It Cm NumberOfPasswordPromptsSpecifies the number of password prompts before giving up.The argument to this keyword must be an integer.Default is 3..It Cm PasswordAuthenticationSpecifies whether to use password authentication.The argument to this keyword must be.Dq yesor.Dq no .The default is.Dq yes ..It Cm PortSpecifies the port number to connect on the remote host.Default is 22..It Cm PreferredAuthenticationsSpecifies the order in which the client should try protocol 2authentication methods.This allows a client to prefer one method (e.g..Cm keyboard-interactive )over another method (e.g..Cm password )The default for this option is:.Dq hostbased,publickey,keyboard-interactive,password ..It Cm ProtocolSpecifies the protocol versions.Nm sshshould support in order of preference.The possible values are.Dq 1and.Dq 2 .Multiple versions must be comma-separated.The default is.Dq 2,1 .This means that.Nm sshtries version 2 and falls back to version 1if version 2 is not available..It Cm ProxyCommandSpecifies the command to use to connect to the server.The commandstring extends to the end of the line, and is executed with.Pa /bin/sh .In the command string,.Ql %hwill be substituted by the host name toconnect and.Ql %pby the port.The command can be basically anything,and should read from its standard input and write to its standard output.It should eventually connect an.Xr sshd 8server running on some machine, or execute.Ic sshd -isomewhere.Host key management will be done using theHostName of the host being connected (defaulting to the name typed bythe user).Setting the command to.Dq nonedisables this option entirely.Note that.Cm CheckHostIPis not available for connects with a proxy command..Pp.It Cm PubkeyAuthenticationSpecifies whether to try public key authentication.The argument to this keyword must be.Dq yesor.Dq no .The default is.Dq yes .This option applies to protocol version 2 only..It Cm RemoteForwardSpecifies that a TCP/IP port on the remote machine be forwarded overthe secure channel to the specified host and port from the local machine.The first argument must be a port number, and the second must be.Xo.Sm off.Oo Ar bind_address : Oc.Ar host : port.Sm on.Xc .IPv6 addresses can be specified by enclosing any addresses in square bracketsor by using the alternative syntax:.Sm off.Xo.Op Ar bind_address No /.Ar host No / Ar port.Xc ..Sm onMultiple forwardings may be specified, and additionalforwardings can be given on the command line.Only the superuser can forward privileged ports..PpIf the.Ar bind_addressis not specified, the default is to only bind to loopback addresses.If the.Ar bind_addressis.Ql *or an empty string, then the forwarding is requested to listen on allinterfaces.Specifying a remote.Ar bind_addresswill only succeed if the server's.Cm GatewayPortsoption is enabled (see.Xr sshd_config 5 ) ..It Cm RhostsRSAAuthenticationSpecifies whether to try rhosts based authentication with RSA hostauthentication.The argument must be.Dq yesor.Dq no .The default is.Dq no .This option applies to protocol version 1 only and requires.Nm sshto be setuid root..It Cm RSAAuthenticationSpecifies whether to try RSA authentication.The argument to this keyword must be.Dq yesor.Dq no .RSA authentication will only beattempted if the identity file exists, or an authentication agent isrunning.The default is.Dq yes .Note that this option applies to protocol version 1 only..It Cm SendEnvSpecifies what variables from the local.Xr environ 7should be sent to the server.Note that environment passing is only supported for protocol 2, theserver must also support it, and the server must be configured toaccept these environment variables.Refer to.Cm AcceptEnvin.Xr sshd_config 5for how to configure the server.Variables are specified by name, which may contain the wildcard characters.Ql \&*and.Ql \&? .Multiple environment variables may be separated by whitespace or spreadacross multiple.Cm SendEnvdirectives.The default is not to send any environment variables..It Cm ServerAliveIntervalSets a timeout interval in seconds after which if no data has been receivedfrom the server,.Nm sshwill send a message through the encryptedchannel to request a response from the server.The defaultis 0, indicating that these messages will not be sent to the server.This option applies to protocol version 2 only..It Cm ServerAliveCountMaxSets the number of server alive messages (see above) which may besent without.Nm sshreceiving any messages back from the server.If this threshold is reached while server alive messages are being sent,.Nm sshwill disconnect from the server, terminating the session.It is important to note that the use of server alive messages is verydifferent from.Cm TCPKeepAlive(below).The server alive messages are sent through the encrypted channeland therefore will not be spoofable.The TCP keepalive option enabled by.Cm TCPKeepAliveis spoofable.The server alive mechanism is valuable when the client orserver depend on knowing when a connection has become inactive..PpThe default value is 3.If, for example,.Cm ServerAliveInterval(above) is set to 15, and.Cm ServerAliveCountMaxis left at the default, if the server becomes unresponsive sshwill disconnect after approximately 45 seconds..It Cm SmartcardDeviceSpecifies which smartcard device to use.The argument to this keyword is the device.Nm sshshould use to communicate with a smartcard used for storing the user'sprivate RSA key.By default, no device is specified and smartcard support is not activated..It Cm StrictHostKeyCheckingIf this flag is set to.Dq yes ,.Nm sshwill never automatically add host keys to the.Pa $HOME/.ssh/known_hostsfile, and refuses to connect to hosts whose host key has changed.This provides maximum protection against trojan horse attacks,however, can be annoying when the.Pa /etc/ssh/ssh_known_hostsfile is poorly maintained, or connections to new hosts arefrequently made.This option forces the user to manuallyadd all new hosts.If this flag is set to.Dq no ,.Nm sshwill automatically add new host keys to theuser known hosts files.If this flag is set to.Dq ask ,new host keyswill be added to the user known host files only after the userhas confirmed that is what they really want to do, and.Nm sshwill refuse to connect to hosts whose host key has changed.The host keys ofknown hosts will be verified automatically in all cases.The argument must be.Dq yes ,.Dq noor.Dq ask .The default is.Dq ask ..It Cm TCPKeepAliveSpecifies whether the system should send TCP keepalive messages to theother side.If they are sent, death of the connection or crash of oneof the machines will be properly noticed.However, this means thatconnections will die if the route is down temporarily, and some peoplefind it annoying..PpThe default is.Dq yes(to send TCP keepalive messages), and the client will noticeif the network goes down or the remote host dies.This is important in scripts, and many users want it too..PpTo disable TCP keepalive messages, the value should be set to.Dq no ..It Cm UsePrivilegedPortSpecifies whether to use a privileged port for outgoing connections.The argument must be.Dq yesor.Dq no .The default is.Dq no .If set to.Dq yes.Nm sshmust be setuid root.Note that this option must be set to.Dq yesfor.Cm RhostsRSAAuthenticationwith older servers..It Cm UserSpecifies the user to log in as.This can be useful when a different user name is used on different machines.This saves the trouble ofhaving to remember to give the user name on the command line..It Cm UserKnownHostsFileSpecifies a file to use for the userhost key database instead of.Pa $HOME/.ssh/known_hosts ..It Cm VerifyHostKeyDNSSpecifies whether to verify the remote key using DNS and SSHFP resourcerecords.If this option is set to.Dq yes ,the client will implicitly trust keys that match a secure fingerprintfrom DNS.Insecure fingerprints will be handled as if this option was set to.Dq ask .If this option is set to.Dq ask ,information on fingerprint match will be displayed, but the user will stillneed to confirm new host keys according to the.Cm StrictHostKeyCheckingoption.The argument must be.Dq yes ,.Dq noor.Dq ask .The default is.Dq no .Note that this option applies to protocol version 2 only..It Cm XAuthLocationSpecifies the full pathname of the.Xr xauth 1program.The default is.Pa /usr/X11R6/bin/xauth ..El.Sh FILES.Bl -tag -width Ds.It Pa $HOME/.ssh/configThis is the per-user configuration file.The format of this file is described above.This file is used by the.Nm sshclient.Because of the potential for abuse, this file must have strict permissions:read/write for the user, and not accessible by others..It Pa /etc/ssh/ssh_configSystemwide configuration file.This file provides defaults for thosevalues that are not specified in the user's configuration file, andfor those users who do not have a configuration file.This file must be world-readable..El.Sh SEE ALSO.Xr ssh 1.Sh AUTHORSOpenSSH is a derivative of the original and freessh 1.2.12 release by Tatu Ylonen.Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,Theo de Raadt and Dug Songremoved many bugs, re-added newer features andcreated OpenSSH.Markus Friedl contributed the support for SSHprotocol versions 1.5 and 2.0.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -