diff options
| author | Joey Hess <joey@kitenet.net> | 2014-07-09 22:12:23 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-07-09 22:12:23 -0400 |
| commit | 0c5e16184f795a329ee9592f6c7bf94ec4312d87 (patch) | |
| tree | ac7c846019ac37018cd0446a760b791ab42367ae /src/Propellor/Property/Ssh.hs | |
| parent | 40f64416def7d2a522cc7e3a111593eea8e57134 (diff) | |
| parent | 54d2888a9616cf5005422b34446797f0357b0098 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/Ssh.hs')
| -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") |
