Skip to content

Commit

Permalink
Add openssh:known_hosts:static to README and pillar.example
Browse files Browse the repository at this point in the history
  • Loading branch information
0xf10e committed Apr 26, 2018
1 parent 45763f5 commit bf9b9a3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ distribution.
``openssh.known_hosts``
-----------------------

Manages the site-wide ssh_known_hosts file and fills it with the
public SSH host keys of all minions. You can restrict the set of minions
Manages the side-wide ssh_known_hosts file and fills it with the
public SSH host keys of your minions (collected via the Salt mine)
and of hosts listed in you pillar data. You can restrict the set of minions
whose keys are listed by using the pillar data ``openssh:known_hosts:target``
and ``openssh:known_hosts:tgt_type`` (those fields map directly to the
corresponding attributes of the ``mine.get`` function).
Expand Down Expand Up @@ -102,6 +103,16 @@ IPv6 behind one of those DNS entries matches an IPv4 or IPv6 behind the
official hostname of a minion, the alternate DNS name will be associated to the
minion's public SSH host key.

To add public keys of hosts not among your minions list them under the
pillar key ``openssh:known_hosts:static``::

openssh:
known_hosts:
static:
github.com: 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq[...]'
gitlab.com: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABA[...]'


``openssh.moduli``
-----------------------

Expand Down
4 changes: 4 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ openssh:
# tgt_type: 'glob'
# To activate the defaults you can just set an empty dict.
#hostnames: {}
# Here you can list keys for hosts which are not among your minions:
static:
github.com: 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGm[...]'
gitlab.com: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsj2bN[...]'

# specify DH parameters (see /etc/ssh/moduli)
moduli: |
Expand Down

0 comments on commit bf9b9a3

Please sign in to comment.