From 4b8a1de146cc41b69e4a11ad6179587628c3b79f Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 31 May 2021 15:54:11 -0700 Subject: add SSH:PARENT-IS-GLOBALLY-KNOWN-HOST Signed-off-by: Sean Whitton --- src/package.lisp | 3 ++- src/property/ssh.lisp | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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)) -- cgit v1.2.3