A partir de 7.3p1, existe a palavra-chave Include
,
que permite incluir arquivos de configuração.
Include
Include the specified configuration file(s). Multiple pathnames may be specified and each pathname may contain glob(3) wildcards and, for user configurations, shell-like “~” references to user home directories. Files without absolute paths are assumed to be in
Source: ssh_config(5).~/.ssh
if included in a user configuration file or/etc/ssh
if included from the system configuration file.Include
directive may appear inside aMatch
orHost
block to perform conditional inclusion.
Por exemplo, você poderia ter em ~/.ssh/config
:
Include config.d/home
Host github.com
HostName github.com
User git
e em ~/.ssh/config.d/home
:
Host laptop
HostName laptop.lan
Nos comentários, use o abaixo para incluir todos os arquivos no diretório config.d
:
Include config.d/*