less than 1 minute read

it is useful to split up the ssh config file.

do as follows

  1. create config folder $ mkdir ~/.ssh/config.d
  2. create multiple config files in that folder (I group different hosts, and use a global options file)
    1. $ touch ~/.ssh/config.d/group1
    2. $ touch ~/.ssh/config.d/group2
    3. $ touch ~/.ssh/config.d/group3
    4. $ touch ~/.ssh/config.d/options
  3. include the whole directory by using the standard config file

    [code language="bash" collapse="false" title="~/.ssh/config"]
    $ cat ~/.ssh/config
    Include config.d/*
    [/code]