Saltstack Official OpenSSH Formula
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

pillar.example 7.0KB

il y a 10 ans
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. sshd_config:
  2. Port: 22
  3. Protocol: 2
  4. HostKey:
  5. - /etc/ssh/ssh_host_rsa_key
  6. - /etc/ssh/ssh_host_dsa_key
  7. - /etc/ssh/ssh_host_ecdsa_key
  8. - /etc/ssh/ssh_host_ed25519_key
  9. UsePrivilegeSeparation: 'yes'
  10. KeyRegenerationInterval: 3600
  11. ServerKeyBits: 768
  12. SyslogFacility: AUTH
  13. LogLevel: INFO
  14. ClientAliveInterval: 0
  15. ClientAliveCountMax: 3
  16. LoginGraceTime: 120
  17. PermitRootLogin: 'yes'
  18. PasswordAuthentication: 'no'
  19. StrictModes: 'yes'
  20. MaxAuthTries: 6
  21. MaxSessions: 10
  22. RSAAuthentication: 'yes'
  23. PubkeyAuthentication: 'yes'
  24. AuthorizedKeysCommand: '/usr/bin/sss_ssh_authorizedkeys'
  25. AuthorizedKeysCommandUser: 'nobody'
  26. IgnoreRhosts: 'yes'
  27. RhostsRSAAuthentication: 'no'
  28. HostbasedAuthentication: 'no'
  29. PermitEmptyPasswords: 'no'
  30. ChallengeResponseAuthentication: 'no'
  31. AuthenticationMethods: 'publickey,keyboard-interactive'
  32. X11Forwarding: 'yes'
  33. X11DisplayOffset: 10
  34. PrintMotd: 'no'
  35. PrintLastLog: 'yes'
  36. TCPKeepAlive: 'yes'
  37. AcceptEnv: "LANG LC_*"
  38. Subsystem: "sftp /usr/lib/openssh/sftp-server"
  39. UsePAM: 'yes'
  40. UseDNS: 'yes'
  41. AllowUsers: 'vader@10.0.0.1 maul@evil.com sidious luke'
  42. DenyUsers: 'yoda chewbaca@112.10.21.1'
  43. AllowGroups: 'wheel staff imperial'
  44. DenyGroups: 'rebel'
  45. matches:
  46. sftp_chroot:
  47. type:
  48. Group: sftpusers
  49. options:
  50. ChrootDirectory: /sftp-chroot/%u
  51. X11Forwarding: no
  52. AllowTcpForwarding: no
  53. ForceCommand: internal-sftp
  54. # Check `man sshd_config` for supported KexAlgorithms, Ciphers and MACs first.
  55. KexAlgorithms: 'diffie-hellman-group14-sha1,diffie-hellman-group1-sha1'
  56. Ciphers: 'aes128-ctr,aes256-ctr'
  57. MACs: 'hmac-sha1'
  58. ssh_config:
  59. StrictHostKeyChecking: no
  60. ForwardAgent: no
  61. ForwardX11: no
  62. RhostsRSAAuthentication: no
  63. RSAAuthentication: yes
  64. PasswordAuthentication: yes
  65. HostbasedAuthentication: no
  66. GSSAPIAuthentication: no
  67. GSSAPIDelegateCredentials: no
  68. BatchMode: 'yes'
  69. CheckHostIP: 'yes'
  70. AddressFamily: 'any'
  71. ConnectTimeout: 0
  72. IdentityFile: '~/.ssh/id_rsa'
  73. Port: 22
  74. Protocol: 2
  75. Cipher: '3des'
  76. Tunnel: 'no'
  77. TunnelDevice: 'any:any'
  78. PermitLocalCommand: 'no'
  79. VisualHostKey: 'no'
  80. openssh:
  81. auth:
  82. joe-valid-ssh-key-desktop:
  83. - user: joe
  84. present: True
  85. enc: ssh-rsa
  86. comment: main key - desktop
  87. joe-valid-ssh-key-notebook:
  88. - user: joe
  89. present: True
  90. enc: ssh-rsa
  91. comment: main key - notebook
  92. joe-non-valid-ssh-key:
  93. - user: joe
  94. present: False
  95. enc: ssh-rsa
  96. comment: obsolete key - removed
  97. generate_dsa_keys: False
  98. absent_dsa_keys: False
  99. provide_dsa_keys: False
  100. dsa:
  101. private_key: |
  102. -----BEGIN DSA PRIVATE KEY-----
  103. NOT_DEFINED
  104. -----END DSA PRIVATE KEY-----
  105. public_key: |
  106. ssh-dss NOT_DEFINED
  107. generate_ecdsa_keys: False
  108. absent_ecdsa_keys: False
  109. provide_ecdsa_keys: False
  110. ecdsa:
  111. private_key: |
  112. -----BEGIN EC PRIVATE KEY-----
  113. NOT_DEFINED
  114. -----END EC PRIVATE KEY-----
  115. public_key: |
  116. ecdsa-sha2-nistp256 NOT_DEFINED
  117. generate_rsa_keys: False
  118. generate_rsa_size: 4096
  119. absent_rsa_keys: False
  120. provide_rsa_keys: False
  121. rsa:
  122. private_key: |
  123. -----BEGIN RSA PRIVATE KEY-----
  124. NOT_DEFINED
  125. -----END RSA PRIVATE KEY-----
  126. public_key: |
  127. ssh-rsa NOT_DEFINED
  128. generate_ed25519_keys: False
  129. absent_ed25519_keys: False
  130. provide_ed25519_keys: False
  131. ed25519:
  132. private_key: |
  133. -----BEGIN OPENSSH PRIVATE KEY-----
  134. NOT_DEFINED
  135. -----END OPENSSH PRIVATE KEY-----
  136. public_key: |
  137. ssh-ed25519 NOT_DEFINED
  138. known_hosts:
  139. # The next 2 settings restrict the set of minions that will be added in
  140. # the generated ssh_known_hosts files (the default is to match all minions)
  141. target: '*'
  142. expr_form: 'glob'
  143. # Name of mining functions used to gather public keys and hostnames
  144. # (the default values are shown here)
  145. mine_keys_function: public_ssh_host_keys
  146. mine_hostname_function: public_ssh_hostname
  147. # List of DNS entries also pointing to our managed machines and that we want
  148. # to inject in our generated ssh_known_hosts file
  149. aliases:
  150. - cname-to-minion.example.org
  151. - alias.example.org
  152. # specify DH parameters (see /etc/ssh/moduli)
  153. moduli: |
  154. # Time Type Tests Tries Size Generator Modulus
  155. 20120821045639 2 6 100 2047 2 DD2047CBDBB6F8E919BC63DE885B34D0FD6E3DB2887D8B46FE249886ACED6B46DFCD5553168185FD376122171CD8927E60120FA8D01F01D03E58281FEA9A1ABE97631C828E41815F34FDCDF787419FE13A3137649AA93D2584230DF5F24B5C00C88B7D7DE4367693428C730376F218A53E853B0851BAB7C53C15DA7839CBE1285DB63F6FA45C1BB59FE1C5BB918F0F8459D7EF60ACFF5C0FA0F3FCAD1C5F4CE4416D4F4B36B05CDCEBE4FB879E95847EFBC6449CD190248843BC7EDB145FBFC4EDBB1A3C959298F08F3BA2CFBE231BBE204BE6F906209D28BD4820AB3E7BE96C26AE8A809ADD8D1A5A0B008E9570FA4C4697E116B8119892C604293680B09D63
  156. 20120821045830 2 6 100 2047 2 DD2047CBDBB6F8E919BC63DE885B34D0FD6E3DB2887D8B46FE249886ACED6B46DFCD5553168185FD376122171CD8927E60120FA8D01F01D03E58281FEA9A1ABE97631C828E41815F34FDCDF787419FE13A3137649AA93D2584230DF5F24B5C00C88B7D7DE4367693428C730376F218A53E853B0851BAB7C53C15DA7839CBE1285DB63F6FA45C1BB59FE1C5BB918F0F8459D7EF60ACFF5C0FA0F3FCAD1C5F4CE4416D4F4B36B05CDCEBE4FB879E95847EFBC6449CD190248843BC7EDB145FBFC4EDBB1A3C959298F08F3BA2CFBE231BBE204BE6F906209D28BD4820AB3E7BE96C26AE8A809ADD8D1A5A0B008E9570FA4C4697E116B8119892C6042936814C2FFB
  157. 20120821050046 2 6 100 2047 2 DD2047CBDBB6F8E919BC63DE885B34D0FD6E3DB2887D8B46FE249886ACED6B46DFCD5553168185FD376122171CD8927E60120FA8D01F01D03E58281FEA9A1ABE97631C828E41815F34FDCDF787419FE13A3137649AA93D2584230DF5F24B5C00C88B7D7DE4367693428C730376F218A53E853B0851BAB7C53C15DA7839CBE1285DB63F6FA45C1BB59FE1C5BB918F0F8459D7EF60ACFF5C0FA0F3FCAD1C5F4CE4416D4F4B36B05CDCEBE4FB879E95847EFBC6449CD190248843BC7EDB145FBFC4EDBB1A3C959298F08F3BA2CFBE231BBE204BE6F906209D28BD4820AB3E7BE96C26AE8A809ADD8D1A5A0B008E9570FA4C4697E116B8119892C60429368214FC53
  158. 20120821050054 2 6 100 2047 5 DD2047CBDBB6F8E919BC63DE885B34D0FD6E3DB2887D8B46FE249886ACED6B46DFCD5553168185FD376122171CD8927E60120FA8D01F01D03E58281FEA9A1ABE97631C828E41815F34FDCDF787419FE13A3137649AA93D2584230DF5F24B5C00C88B7D7DE4367693428C730376F218A53E853B0851BAB7C53C15DA7839CBE1285DB63F6FA45C1BB59FE1C5BB918F0F8459D7EF60ACFF5C0FA0F3FCAD1C5F4CE4416D4F4B36B05CDCEBE4FB879E95847EFBC6449CD190248843BC7EDB145FBFC4EDBB1A3C959298F08F3BA2CFBE231BBE204BE6F906209D28BD4820AB3E7BE96C26AE8A809ADD8D1A5A0B008E9570FA4C4697E116B8119892C60429368218E83F
  159. # ALTERNATIVELY, specify the location of the moduli file. Examples:
  160. #moduli_source: http://some.server.somewhere/salt/moduli
  161. #moduli_source: salt://files/ssh/moduli
  162. # If moduli is specified, moduli_source will be ignored.
  163. # Also, a proper hash file *must* be included in the same path. E.g.:
  164. # http://some.server.somewhere/salt/moduli.hash
  165. # salt://files/ssh/moduli.hash
  166. # These will be automatically referenced to by the ssh_moduli state.
  167. # Required for openssh.known_hosts
  168. mine_functions:
  169. public_ssh_host_keys:
  170. mine_function: cmd.run
  171. cmd: cat /etc/ssh/ssh_host_*_key.pub
  172. python_shell: True
  173. public_ssh_hostname:
  174. mine_function: grains.get
  175. key: id