aboutsummaryrefslogtreecommitdiff
path: root/src/property/ssh.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-05-31 15:54:11 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-05-31 15:54:11 -0700
commit4b8a1de146cc41b69e4a11ad6179587628c3b79f (patch)
treee28fa81f6a6509e65e90bce92964ff59df9f4b1d /src/property/ssh.lisp
parent3781191a87bb3ef02515e8d6ef761246c6d1d43f (diff)
downloadconsfigurator-4b8a1de146cc41b69e4a11ad6179587628c3b79f.tar.gz
add SSH:PARENT-IS-GLOBALLY-KNOWN-HOST
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/ssh.lisp')
-rw-r--r--src/property/ssh.lisp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/property/ssh.lisp b/src/property/ssh.lisp
index 76935d0..df014c3 100644
--- a/src/property/ssh.lisp
+++ b/src/property/ssh.lisp
@@ -72,3 +72,12 @@ identifying HOST, to simplify refreshing keys."
(:desc #?"${(get-hostname host)} is globally known host to ssh client")
(%update-known-hosts
"/etc/ssh/ssh_known_hosts" host :short-hostname short-hostname))
+
+(defproplist parent-is-globally-known-host :posix (&key short-hostname)
+ "Ensures that the SSH host keys of the parent host are stored in
+/etc/ssh/ssh_known_hosts; SHORT-HOSTNAME is as for SSH:GLOBALLY-KNOWN-HOST."
+ (:desc "Parent host is globally known host to ssh client")
+ (%update-known-hosts
+ "/etc/ssh/ssh_known_hosts" (make-host :hostattrs
+ (get-hostattrs :parent-hostattrs))
+ :short-hostname short-hostname))