OpenSSH client configuration file (`ssh_config`) syntax

  1. Command-line options take precedence over configuration files.
  2. The user-specific configuration file ~/.ssh/config is used next.
  3. Finally, the global /etc/ssh/ssh_config file is used.

The first obtained value for each configuration parameter will be used.

ssh.com/academy/ssh/config

  • Empty lines and lines starting with '#' are comments.
  • Each line begins with a keyword, followed by argument(s).
  • Configuration options may be separated by whitespace or optional whitespace and exactly one =.
  • Arguments may be enclosed in double quotes (") in order to specify arguments that contain spaces.

ssh.com/academy/ssh/config#format-of-ssh-client-config-file-ssh_config

See also: OpenSSH server configuration file (sshd_config) syntax.

My ~/.ssh/config for Cygwin