Skip to content

Commit 262fd19

Browse files
committed
Example of ssh::server::host_key
1 parent db17c3d commit 262fd19

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.markdown

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,22 @@ Subsystem sftp /usr/lib/openssh/sftp-server
155155
UsePAM yes
156156
PasswordAuthentication no
157157
```
158+
159+
## Defining host keys for server
160+
You can define host keys your server will use
161+
162+
ssh::server::host_key {'ssh_host_rsa_key':
163+
private_key_content => '<the private key>',
164+
public_key_content => '<the public key>',
165+
}
166+
167+
Alternately, you could create the host key providing the files, instead
168+
of the content:
169+
170+
ssh::server::host_key {'ssh_host_rsa_key':
171+
private_key_source => 'puppet:///mymodule/ssh_host_rsa_key',
172+
public_key_source => 'puppet:///mymodule/ssh_host_rsa_key.pub',
173+
}
174+
175+
Both of these definitions will create /etc/ssh/ssh_host_rsa_key and
176+
/etc/ssh/ssh_host_rsa_key.pub and restart sshd daemon.

0 commit comments

Comments
 (0)