22
33Manage SSH client and server via Puppet
44
5- ## Client only
6- Collected host keys from servers will be written to known_hosts
7-
8- ```
9- include ssh::client
10- ```
5+ ### Gittip
6+ [ ![ Support via Gittip] ( https://rawgithub.com/twolfson/gittip-badge/0.2.0/dist/gittip.png )] ( https://www.gittip.com/saz/ )
117
12- ## Server only
13- Host keys will be collected for client distribution
8+ ## Requirements
9+ * Exported resources for host keys management
10+ * puppetlabs/stdlib
1411
15- ```
16- include ssh::server
17- ```
12+ ## Usage
1813
19- ## Both client and server
14+ ### Both client and server
2015Host keys will be collected and distributed
2116
2217```
2318 include ssh
2419```
2520
26- ### Changing options
27-
2821```
2922 class { 'ssh':
3023 server_options => {
@@ -44,7 +37,47 @@ Host keys will be collected and distributed
4437 }
4538```
4639
47- # Requirements
48- * Exported resources for host keys management
49- * puppetlabs/stdlib
40+ ### Client only
41+ Collected host keys from servers will be written to known_hosts
5042
43+ ```
44+ include ssh::client
45+ ```
46+
47+ ```
48+ class { 'ssh::client':
49+ options => {
50+ 'Host short' => {
51+ 'User' => 'my-user',
52+ 'HostName' => 'extreme.long.and.complicated.hostname.domain.tld',
53+ },
54+ 'Host *' => {
55+ 'User' => 'andromeda',
56+ 'UserKnownHostsFile' => '/dev/null',
57+ },
58+ },
59+ }
60+ ```
61+
62+ ### Server only
63+ Host keys will be collected for client distribution
64+
65+ ```
66+ include ssh::server
67+ ```
68+
69+ ```
70+ class { 'ssh::server':
71+ options => {
72+ 'Match User www-data' => {
73+ 'ChrootDirectory' => '%h',
74+ 'ForceCommand' => 'internal-sftp',
75+ 'PasswordAuthentication' => 'yes',
76+ 'AllowTcpForwarding' => 'no',
77+ 'X11Forwarding' => 'no',
78+ },
79+ 'PasswordAuthentication' => 'no',
80+ 'PermitRootLogin' => 'no',
81+ },
82+ }
83+ ```
0 commit comments