diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2019-12-03 21:59:09 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2019-12-04 18:16:08 +0100 |
| commit | ed15dfcf31ec35c58f5a44d1d8adf5048da67ea6 (patch) | |
| tree | 1d1903d786ee2186b99e8873fe7fef22d1fe1b27 /gnu/machine | |
| parent | 2b8682841d0f1b7a054f864fd1657c3963b64348 (diff) | |
machine: ssh: <machine-ssh-configuration> can include the host key.
* gnu/machine/ssh.scm (<machine-ssh-configuration>)[host-key]: New field.
(machine-ssh-session): Pass #:host-key to 'open-ssh-session'.
* doc/guix.texi (Invoking guix deploy): Document it.
Diffstat (limited to 'gnu/machine')
| -rw-r--r-- | gnu/machine/ssh.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index 6e3ed0e0929..23ae917b79c 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm | |||
| @@ -54,6 +54,7 @@ | |||
| 54 | machine-ssh-configuration-authorize? | 54 | machine-ssh-configuration-authorize? |
| 55 | machine-ssh-configuration-port | 55 | machine-ssh-configuration-port |
| 56 | machine-ssh-configuration-user | 56 | machine-ssh-configuration-user |
| 57 | machine-ssh-configuration-host-key | ||
| 57 | machine-ssh-configuration-session)) | 58 | machine-ssh-configuration-session)) |
| 58 | 59 | ||
| 59 | ;;; Commentary: | 60 | ;;; Commentary: |
| @@ -87,6 +88,8 @@ | |||
| 87 | (identity machine-ssh-configuration-identity ; path to a private key | 88 | (identity machine-ssh-configuration-identity ; path to a private key |
| 88 | (default #f)) | 89 | (default #f)) |
| 89 | (session machine-ssh-configuration-session ; session | 90 | (session machine-ssh-configuration-session ; session |
| 91 | (default #f)) | ||
| 92 | (host-key machine-ssh-configuration-host-key ; #f | string | ||
| 90 | (default #f))) | 93 | (default #f))) |
| 91 | 94 | ||
| 92 | (define (machine-ssh-session machine) | 95 | (define (machine-ssh-session machine) |
| @@ -98,11 +101,13 @@ one from the configuration's parameters if one was not provided." | |||
| 98 | (let ((host-name (machine-ssh-configuration-host-name config)) | 101 | (let ((host-name (machine-ssh-configuration-host-name config)) |
| 99 | (user (machine-ssh-configuration-user config)) | 102 | (user (machine-ssh-configuration-user config)) |
| 100 | (port (machine-ssh-configuration-port config)) | 103 | (port (machine-ssh-configuration-port config)) |
| 101 | (identity (machine-ssh-configuration-identity config))) | 104 | (identity (machine-ssh-configuration-identity config)) |
| 105 | (host-key (machine-ssh-configuration-host-key config))) | ||
| 102 | (open-ssh-session host-name | 106 | (open-ssh-session host-name |
| 103 | #:user user | 107 | #:user user |
| 104 | #:port port | 108 | #:port port |
| 105 | #:identity identity))))) | 109 | #:identity identity |
| 110 | #:host-key host-key))))) | ||
| 106 | 111 | ||
| 107 | 112 | ||
| 108 | ;;; | 113 | ;;; |
