OpenSSH config files are used for configuration that should be applied every time the ssh client is run. Most command line options are possible to put in the config files.
OpenSSH uses configuration from the following sources in order:
~/.ssh/config
/etc/ssh/ssh_config
Configuration options are listed one by one in the config files.
# This is a comment.
# Parameter can be specified like this, separated with white space.
StrictHostKeyChecking ask
# Or parameter key and value may be separated with white space and =.
ForwardX11 = yes
# The parameter value can be quoted if it contains white space.
IdentityFile "/file system/path with/white space"
The full list of possible config parameters is available here.
One of the most useful features of the config file is that it can be sectioned based on host name or address. In this way you can have different configurations for different hosts.
# Based on host name.
Host host1.domain.com
User user1
Host host2.domain.com
User user2
# Or wildcard matching name or ip.
Host *elastic-cloud.com 10.201.4.?
User user3