该~/.ssh/config
文件没有包含其他文件的指令,可能与SSH的文件权限检查有关。
有关此问题的建议可以包括一个脚本,以在系统上或通过存储库上的签入挂钩一起汇总多个更改。人们可能还会研究诸如Puppet或Augeas之类的工具。
但是,无论采用哪种方法,都必须将单个文件从文件外部串联为单个文件。
$ cat ~/.ssh/config_* >> ~/.ssh/config
注意: 覆盖:>
vs追加:>>
2017年12月更新:
从7.3p1开始,包含选项。它允许您包括配置文件。
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.