Can you have more than one ~/.ssh/config file?

The ~/.ssh/config file don't have a directive for including other files, possibly related to SSH's check for file permissions.

Suggestions around this can include a script to cat several changes together either on the system or via checkin hooks on a repository. One might also look into tools such as Puppet or Augeas.

However you approach it, though, you'll have to concatenate individual files to be a single file from outside of the file.

$ cat ~/.ssh/config_* >> ~/.ssh/config

note: overwrite: > v.s. append: >>

Update December 2017:

From 7.3p1 and up, there is the Include option. Which allows you to include configuration files.

Include
    Include the specified configuration file(s).  Mul‐
    tiple pathnames may be specified and each pathname
    may contain glob(3) wildcards and, for user config‐
    urations, shell-like “~” references to user home
    directories.  Files without absolute paths are
    assumed to be in ~/.ssh if included in a user con‐
    figuration file or /etc/ssh if included from the
    system configuration file.  Include directive may
    appear inside a Match or Host block to perform con‐
    ditional inclusion.

You can specify current config file to use in ssh option like this:

ssh -F /path/to/configfile

Seems it's the only way.

Also there is noway to include one config into another.


Starting with ssh 7.3 (released on August 1st, 2016), an Include directive is available.

Include: Include the specified configuration file(s). Multiple path names may be specified and each pathname may contain glob wildcards and shell-like "~" references to user home directories. Files without absolute paths are assumed to be in ~/.ssh. An Include directive may appear inside a Match or Host block to perform conditional inclusion.

(Here is the link to the resolved bug report, that also includes the patch: https://bugzilla.mindrot.org/show_bug.cgi?id=1585#c24)