Saltstack Official OpenSSH Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 line
6.5KB

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