Hint at Host support for ssh_config (#133)

The `ssh_config` state supports generating `Host` sections, but it is
buried in the source. By default, options are simply dumped in the
configuration file; without any `Host` directive.

This patch hints (and, actually, encourages) users to use `Host`
sections by updating the pillar example to use the `Hosts` directive
with the `*` pattern.
This commit is contained in:
Philippe Grégoire 2018-08-24 06:14:26 -04:00 committed by Niels Abspoel
parent 6e077f5dbe
commit 7cfc9f5a04

View File

@ -143,56 +143,58 @@ sshd_config:
# machine. This can break SSH connections with servers using older versions of # machine. This can break SSH connections with servers using older versions of
# openssh. Please make sure you understand the implication of different settings # openssh. Please make sure you understand the implication of different settings
ssh_config: ssh_config:
StrictHostKeyChecking: no Hosts:
ForwardAgent: no '*':
ForwardX11: no StrictHostKeyChecking: no
RhostsRSAAuthentication: no ForwardAgent: no
RSAAuthentication: yes ForwardX11: no
PasswordAuthentication: yes RhostsRSAAuthentication: no
HostbasedAuthentication: no RSAAuthentication: yes
GSSAPIAuthentication: no PasswordAuthentication: yes
GSSAPIDelegateCredentials: no HostbasedAuthentication: no
BatchMode: 'yes' GSSAPIAuthentication: no
CheckHostIP: 'yes' GSSAPIDelegateCredentials: no
AddressFamily: 'any' BatchMode: 'yes'
ConnectTimeout: 0 CheckHostIP: 'yes'
IdentityFile: '~/.ssh/id_rsa' AddressFamily: 'any'
Port: 22 ConnectTimeout: 0
Protocol: 2 IdentityFile: '~/.ssh/id_rsa'
Cipher: '3des' Port: 22
Tunnel: 'no' Protocol: 2
TunnelDevice: 'any:any' Cipher: '3des'
PermitLocalCommand: 'no' Tunnel: 'no'
VisualHostKey: 'no' TunnelDevice: 'any:any'
# Check `man ssh_config` for supported KexAlgorithms, Ciphers and MACs first. PermitLocalCommand: 'no'
# WARNING! Please make sure you understand the implications of the below VisualHostKey: 'no'
# settings. The examples provided below might break your connection to older / # Check `man ssh_config` for supported KexAlgorithms, Ciphers and MACs first.
# legacy openssh servers. # WARNING! Please make sure you understand the implications of the below
# The configuration given in the example below is based on: # settings. The examples provided below might break your connection to older /
# https://stribika.github.io/2015/01/04/secure-secure-shell.html # legacy openssh servers.
# You can specify KexAlgorithms, Ciphers and MACs as both key or a list. # The configuration given in the example below is based on:
#KexAlgorithms: 'curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1' # https://stribika.github.io/2015/01/04/secure-secure-shell.html
#Ciphers: 'chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr' # You can specify KexAlgorithms, Ciphers and MACs as both key or a list.
#MACs: 'hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com' #KexAlgorithms: 'curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1'
KexAlgorithms: #Ciphers: 'chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr'
- 'curve25519-sha256@libssh.org' #MACs: 'hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com'
- 'diffie-hellman-group-exchange-sha256' KexAlgorithms:
- 'diffie-hellman-group-exchange-sha1' - 'curve25519-sha256@libssh.org'
- 'diffie-hellman-group14-sha1' - 'diffie-hellman-group-exchange-sha256'
Ciphers: - 'diffie-hellman-group-exchange-sha1'
- 'chacha20-poly1305@openssh.com' - 'diffie-hellman-group14-sha1'
- 'aes256-gcm@openssh.com' Ciphers:
- 'aes128-gcm@openssh.com' - 'chacha20-poly1305@openssh.com'
- 'aes256-ctr' - 'aes256-gcm@openssh.com'
- 'aes192-ctr' - 'aes128-gcm@openssh.com'
- 'aes128-ctr' - 'aes256-ctr'
MACs: - 'aes192-ctr'
- 'hmac-sha2-512-etm@openssh.com' - 'aes128-ctr'
- 'hmac-sha2-256-etm@openssh.com' MACs:
- 'umac-128-etm@openssh.com' - 'hmac-sha2-512-etm@openssh.com'
- 'hmac-sha2-512' - 'hmac-sha2-256-etm@openssh.com'
- 'hmac-sha2-256' - 'umac-128-etm@openssh.com'
- 'umac-128@openssh.com' - 'hmac-sha2-512'
- 'hmac-sha2-256'
- 'umac-128@openssh.com'
openssh: openssh: