summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Ssh.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Property/Ssh.hs')
-rw-r--r--src/Propellor/Property/Ssh.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Propellor/Property/Ssh.hs b/src/Propellor/Property/Ssh.hs
index b6ed476e..238e67e4 100644
--- a/src/Propellor/Property/Ssh.hs
+++ b/src/Propellor/Property/Ssh.hs
@@ -9,6 +9,7 @@ module Propellor.Property.Ssh (
hostKeys,
hostKey,
pubKey,
+ getPubKey,
keyImported,
knownHost,
authorizedKeys,
@@ -120,7 +121,7 @@ hostKey context keytype pub = combineProperties desc
desc = "ssh host key configured (" ++ fromKeyType keytype ++ ")"
install writer ispub key = do
let f = keyFile keytype ispub
- s <- liftIO $ readFileStrict f
+ s <- liftIO $ catchDefaultIO "" $ readFileStrict f
if s == key
then noChange
else makeChange $ writer f key