diff options
Diffstat (limited to 'ssh_config.5')
| -rw-r--r-- | ssh_config.5 | 96 |
1 files changed, 54 insertions, 42 deletions
diff --git a/ssh_config.5 b/ssh_config.5 index b459b0449709..4ac0d3d45d04 100644 --- a/ssh_config.5 +++ b/ssh_config.5 @@ -33,8 +33,8 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: ssh_config.5,v 1.423 2026/03/23 01:33:46 djm Exp $ -.Dd $Mdocdate: March 23 2026 $ +.\" $OpenBSD: ssh_config.5,v 1.426 2026/07/01 00:52:31 djm Exp $ +.Dd $Mdocdate: July 1 2026 $ .Dt SSH_CONFIG 5 .Os .Sh NAME @@ -56,31 +56,36 @@ system-wide configuration file .Pq Pa /etc/ssh/ssh_config .El .Pp -Unless noted otherwise, for each parameter, the first obtained value -will be used. -The configuration files contain sections separated by +Unless noted otherwise, for each configuration directive, the first +specified value will be used. +.Pp +The configuration files may contain sections separated by conditional .Cm Host -specifications, and that section is only applied for hosts that -match one of the patterns given in the specification. -The matched host name is usually the one given on the command line -(see the -.Cm CanonicalizeHostname -option for exceptions). +or +.Cm Match +directives. +Configuration in these sections is only applied if the conditional directive +that started the section matches. .Pp -Since the first obtained value for each parameter is used, more +Since the first obtained value for each directive is used, more host-specific declarations should be given near the beginning of the file, and general defaults at the end. .Pp -The file contains keyword-argument pairs, one per line. +The file contains directive/values pairs, one per line. Lines starting with .Ql # and empty lines are interpreted as comments. -Arguments may optionally be enclosed in double quotes +.Ql # +outside of a quoted string may be used to add a comment to the end of a line. +Whitespace at the beginning or end of lines is ignored. +Values may optionally be enclosed in double quotes .Pq \&" in order to represent arguments containing spaces. -Configuration options may be separated by whitespace or -optional whitespace and exactly one -.Ql = ; +.Pp +Configuration directives are separated from their values by whitespace +or exactly one +.Ql = +character (which may be surrounded by whitespace); the latter format is useful to avoid the need to quote whitespace when specifying configuration options using the .Nm ssh , @@ -280,6 +285,31 @@ for transport-only sessions, such as when is started with the .Fl N flag. +.It Cm Include +Include the specified configuration file(s). +Multiple pathnames may be specified and each pathname may contain +.Xr glob 7 +wildcards, +tokens as described in the +.Sx TOKENS +section, environment variables as described in the +.Sx ENVIRONMENT VARIABLES +section and, for user configurations, shell-like +.Sq ~ +references to user home directories. +Wildcards will be expanded and processed in lexical order. +Files without absolute paths are assumed to be in +.Pa ~/.ssh +if included in a user configuration file or +.Pa /etc/ssh +if included from the system configuration file. +.Cm Include +directive may appear inside a +.Cm Match +or +.Cm Host +block +to perform conditional inclusion. .It Cm AddKeysToAgent Specifies whether keys should be automatically added to a running .Xr ssh-agent 1 . @@ -648,6 +678,13 @@ The argument must be or .Cm no (the default). +.Pp +Compression applies to all traffic that flows over the SSH connection. +If untrusted traffic (such as an open port-forward) is permitted over the +connection alongside trusted traffic, then compression may leak information +about session contents. +For this reason, it is not recommended to enable compression for connections +that share trusted and untrusted traffic. .It Cm ConnectionAttempts Specifies the number of tries (one per second) to make before exiting. The argument must be an integer. @@ -1220,31 +1257,6 @@ It is recommended that .Cm IgnoreUnknown be listed early in the configuration file as it will not be applied to unknown options that appear before it. -.It Cm Include -Include the specified configuration file(s). -Multiple pathnames may be specified and each pathname may contain -.Xr glob 7 -wildcards, -tokens as described in the -.Sx TOKENS -section, environment variables as described in the -.Sx ENVIRONMENT VARIABLES -section and, for user configurations, shell-like -.Sq ~ -references to user home directories. -Wildcards will be expanded and processed in lexical order. -Files without absolute paths are assumed to be in -.Pa ~/.ssh -if included in a user configuration file or -.Pa /etc/ssh -if included from the system configuration file. -.Cm Include -directive may appear inside a -.Cm Match -or -.Cm Host -block -to perform conditional inclusion. .It Cm IPQoS Specifies the .Em Differentiated Services Field Codepoint Pq DSCP |
