Saltstack Official OpenSSH Formula
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

pillar.example 3.5KB

10 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. LoginGraceTime: 120
  15. PermitRootLogin: 'yes'
  16. PasswordAuthentication: 'no'
  17. StrictModes: 'yes'
  18. RSAAuthentication: 'yes'
  19. PubkeyAuthentication: 'yes'
  20. IgnoreRhosts: 'yes'
  21. RhostsRSAAuthentication: 'no'
  22. HostbasedAuthentication: 'no'
  23. PermitEmptyPasswords: 'no'
  24. ChallengeResponseAuthentication: 'no'
  25. AuthenticationMethods: 'publickey,keyboard-interactive'
  26. X11Forwarding: 'yes'
  27. X11DisplayOffset: 10
  28. PrintMotd: 'no'
  29. PrintLastLog: 'yes'
  30. TCPKeepAlive: 'yes'
  31. AcceptEnv: "LANG LC_*"
  32. Subsystem: "sftp /usr/lib/openssh/sftp-server"
  33. UsePAM: 'yes'
  34. UseDNS: 'yes'
  35. AllowUsers: 'vader@10.0.0.1 maul@evil.com sidious luke'
  36. DenyUsers: 'yoda chewbaca@112.10.21.1'
  37. AllowGroups: 'wheel staff imperial'
  38. DenyGroups: 'rebel'
  39. matches:
  40. sftp_chroot:
  41. type:
  42. Group: sftpusers
  43. options:
  44. ChrootDirectory: /sftp-chroot/%u
  45. X11Forwarding: no
  46. AllowTcpForwarding: no
  47. ForceCommand: internal-sftp
  48. openssh:
  49. auth:
  50. joe-valid-ssh-key-desktop:
  51. - user: joe
  52. present: True
  53. enc: ssh-rsa
  54. comment: main key - desktop
  55. joe-valid-ssh-key-notebook:
  56. - user: joe
  57. present: True
  58. enc: ssh-rsa
  59. comment: main key - notebook
  60. joe-non-valid-ssh-key:
  61. - user: joe
  62. present: False
  63. enc: ssh-rsa
  64. comment: obsolete key - removed
  65. generate_dsa_keys: False
  66. absent_dsa_keys: False
  67. provide_dsa_keys: False
  68. dsa:
  69. private_key: |
  70. -----BEGIN DSA PRIVATE KEY-----
  71. NOT_DEFINED
  72. -----END DSA PRIVATE KEY-----
  73. public_key: |
  74. ssh-dss NOT_DEFINED
  75. generate_ecdsa_keys: False
  76. absent_ecdsa_keys: False
  77. provide_ecdsa_keys: False
  78. ecdsa:
  79. private_key: |
  80. -----BEGIN EC PRIVATE KEY-----
  81. NOT_DEFINED
  82. -----END EC PRIVATE KEY-----
  83. public_key: |
  84. ecdsa-sha2-nistp256 NOT_DEFINED
  85. generate_rsa_keys: False
  86. absent_rsa_keys: False
  87. provide_rsa_keys: False
  88. rsa:
  89. private_key: |
  90. -----BEGIN RSA PRIVATE KEY-----
  91. NOT_DEFINED
  92. -----END RSA PRIVATE KEY-----
  93. public_key: |
  94. ssh-rsa NOT_DEFINED
  95. generate_ed25519_keys: False
  96. absent_ed25519_keys: False
  97. provide_ed25519_keys: False
  98. ed25519:
  99. private_key: |
  100. -----BEGIN OPENSSH PRIVATE KEY-----
  101. NOT_DEFINED
  102. -----END OPENSSH PRIVATE KEY-----
  103. public_key: |
  104. ssh-ed25519 NOT_DEFINED
  105. known_hosts:
  106. # The next 2 settings restrict the set of minions that will be added in
  107. # the generated ssh_known_hosts files (the default is to match all minions)
  108. target: '*'
  109. expr_form: 'glob'
  110. # Name of mining functions used to gather public keys and hostnames
  111. # (the default values are shown here)
  112. mine_keys_function: public_ssh_host_keys
  113. mine_hostname_function: public_ssh_hostname
  114. # List of DNS entries also pointing to our managed machines and that we want
  115. # to inject in our generated ssh_known_hosts file
  116. aliases:
  117. - cname-to-minion.example.org
  118. - alias.example.org
  119. # Required for openssh.known_hosts
  120. mine_functions:
  121. public_ssh_host_keys:
  122. mine_function: cmd.run
  123. cmd: cat /etc/ssh/ssh_host_*_key.pub
  124. python_shell: True
  125. public_ssh_hostname:
  126. mine_function: grains.get
  127. key: id