aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/package.lisp3
-rw-r--r--src/property/ssh.lisp9
2 files changed, 11 insertions, 1 deletions
diff --git a/src/package.lisp b/src/package.lisp
index ff25076..9050493 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -507,7 +507,8 @@
(#:sshd #:consfigurator.property.sshd))
(:export #:authorized-keys
#:known-host
- #:globally-known-host))
+ #:globally-known-host
+ #:parent-is-globally-known-host))
(defpackage :consfigurator.property.locale
(:use #:cl #:consfigurator)
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))