📄 ssh_config.5
字号:
Specifies 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 KeepAliveSpecifies 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 keepalives), 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 keepalives, the value should be set to.Dq no ..It Cm KerberosAuthenticationSpecifies whether Kerberos authentication will be used.The argument to this keyword must be.Dq yesor.Dq no ..It Cm KerberosTgtPassingSpecifies whether a Kerberos TGT will be forwarded to the server.This will only work if the Kerberos server is actually an AFS kaserver.The argument to this keyword must be.Dq yesor.Dq no ..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.Ar host:port .IPv6 addresses can be specified with an alternative syntax:.Ar host/port .Multiple forwardings may be specified, and additionalforwardings can be given on the command line.Only the superuser can forward privileged ports..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. DEBUG2and 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).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.Ar host:port .IPv6 addresses can be specified with an alternative syntax:.Ar host/port .Multiple forwardings may be specified, and additionalforwardings can be given on the command line.Only the superuser can forward privileged ports..It Cm RhostsAuthenticationSpecifies whether to try rhosts based authentication.Note that thisdeclaration only affects the client side and has no effect whatsoeveron security.Most servers do not permit RhostsAuthentication because itis not secure (see.Cm RhostsRSAAuthentication ) .The argument to this keyword must be.Dq yesor.Dq no .The default is.Dq no .This option applies to protocol version 1 only..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 SmartcardDeviceSpecifies which smartcard device to use. The argument to this keyword isthe 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 supportis 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 UsePrivilegedPortSpecifies whether to use a privileged port for outgoing connections.The argument must be.Dq yesor.Dq no .The default is.Dq no .Note that this option must be set to.Dq yesif.Cm RhostsAuthenticationand.Cm RhostsRSAAuthenticationauthentications are needed with 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 XAuthLocationSpecifies the location 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.This file does not usually contain any sensitive information,but the recommended permissions are read/write for the user, and notaccessible 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 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..Sh SEE ALSO.Xr ssh 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -