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 3.3KB

il y a 10 ans
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. Deny
  40. matches:
  41. sftp_chroot:
  42. type:
  43. Group: sftpusers
  44. options:
  45. ChrootDirectory: /sftp-chroot/%u
  46. X11Forwarding: no
  47. AllowTcpForwarding: no
  48. ForceCommand: internal-sftp
  49. openssh:
  50. auth:
  51. joe-valid-ssh-key-desktop:
  52. - user: joe
  53. present: True
  54. enc: ssh-rsa
  55. comment: main key - desktop
  56. joe-valid-ssh-key-notebook:
  57. - user: joe
  58. present: True
  59. enc: ssh-rsa
  60. comment: main key - notebook
  61. joe-non-valid-ssh-key:
  62. - user: joe
  63. present: False
  64. enc: ssh-rsa
  65. comment: obsolete key - removed
  66. generate_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. provide_ecdsa_keys: False
  77. ecdsa:
  78. private_key: |
  79. -----BEGIN EC PRIVATE KEY-----
  80. NOT_DEFINED
  81. -----END EC PRIVATE KEY-----
  82. public_key: |
  83. ecdsa-sha2-nistp256 NOT_DEFINED
  84. generate_rsa_keys: False
  85. provide_rsa_keys: False
  86. rsa:
  87. private_key: |
  88. -----BEGIN RSA PRIVATE KEY-----
  89. NOT_DEFINED
  90. -----END RSA PRIVATE KEY-----
  91. public_key: |
  92. ssh-rsa NOT_DEFINED
  93. generate_ed25519_keys: False
  94. provide_ed25519_keys: False
  95. ed25519:
  96. private_key: |
  97. -----BEGIN OPENSSH PRIVATE KEY-----
  98. NOT_DEFINED
  99. -----END OPENSSH PRIVATE KEY-----
  100. public_key: |
  101. ssh-ed25519 NOT_DEFINED
  102. known_hosts:
  103. # The next 2 settings restrict the set of minions that will be added in
  104. # the generated ssh_known_hosts files (the default is to match all minions)
  105. target: '*'
  106. expr_form: 'glob'
  107. # Name of mining functions used to gather public keys and hostnames
  108. # (the default values are shown here)
  109. mine_keys_function: public_ssh_host_keys
  110. mine_hostname_function: public_ssh_hostname
  111. # List of DNS entries also pointing to our managed machines and that we want
  112. # to inject in our generated ssh_known_hosts file
  113. aliases:
  114. - cname-to-minion.example.org
  115. - alias.example.org
  116. # Required for openssh.known_hosts
  117. mine_functions:
  118. public_ssh_host_keys:
  119. mine_function: cmd.run
  120. cmd: cat /etc/ssh/ssh_host_*_key.pub
  121. public_ssh_hostname:
  122. mine_function: grains.get
  123. key: id