diff options
| author | Joey Hess <joey@kitenet.net> | 2014-07-07 11:32:29 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-07-07 11:32:29 -0400 |
| commit | bae7e085977f5c2470e9e1aa4f74fa44b69db456 (patch) | |
| tree | e31ac3d43aa0f8c01007a3b07cb698cc3e64f8cc /src/Propellor | |
| parent | e53faff843a34fd3a4655cb4ee6c570f2072d73e (diff) | |
propellor spin
Diffstat (limited to 'src/Propellor')
| -rw-r--r-- | src/Propellor/Property/Ssh.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Propellor/Property/Ssh.hs b/src/Propellor/Property/Ssh.hs index 6785ede6..5a260476 100644 --- a/src/Propellor/Property/Ssh.hs +++ b/src/Propellor/Property/Ssh.hs @@ -5,6 +5,7 @@ module Propellor.Property.Ssh ( hasAuthorizedKeys, restartSshd, randomHostKeys, + hostKeys, hostKey, keyImported, knownHost, @@ -75,7 +76,15 @@ randomHostKeys = flagFile prop "/etc/ssh/.unique_host_keys" ensureProperty $ scriptProperty [ "DPKG_MAINTSCRIPT_NAME=postinst DPKG_MAINTSCRIPT_PACKAGE=openssh-server /var/lib/dpkg/info/openssh-server.postinst configure" ] --- | Sets ssh host keys. +-- | Sets all types of ssh host keys from the privdata. +hostKeys :: Context -> Property +hostKeys ctx = propertyList "known ssh host keys" + [ hostKey SshDsa ctx + , hostKey SshRsa ctx + , hostKey SshEcdsa ctx + ] + +-- | Sets a single ssh host key from the privdata. hostKey :: SshKeyType -> Context -> Property hostKey keytype context = combineProperties desc [ installkey (SshPubKey keytype "") (install writeFile ".pub") |
