mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
ssh: Add Kerberos-support to ssh:// daemon URLs
* guix/ssh.scm (open-ssh-session): Fall back to GSSAPI if public key authentication does not work Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
ef30ddb2c2
commit
35f3511167
2 changed files with 13 additions and 7 deletions
|
@ -6811,8 +6811,9 @@ instruct it to listen for TCP connections (@pxref{Invoking guix-daemon,
|
|||
@item ssh
|
||||
@cindex SSH access to build daemons
|
||||
These URIs allow you to connect to a remote daemon over
|
||||
SSH@footnote{This feature requires Guile-SSH (@pxref{Requirements}).}.
|
||||
A typical URL might look like this:
|
||||
SSH. This feature requires Guile-SSH (@pxref{Requirements}) and a working
|
||||
@code{guile} binary in @code{PATH} on the destination machine. It supports
|
||||
public key and GSSAPI authentication. A typical URL might look like this:
|
||||
|
||||
@example
|
||||
ssh://charlie@@guix.example.org:22
|
||||
|
|
|
@ -153,6 +153,11 @@ (define* (open-ssh-session host #:key user port identity
|
|||
|
||||
;; Use public key authentication, via the SSH agent if it's available.
|
||||
(match (userauth-public-key/auto! session)
|
||||
('success
|
||||
(session-set! session 'timeout timeout)
|
||||
session)
|
||||
(x
|
||||
(match (userauth-gssapi! session)
|
||||
('success
|
||||
(session-set! session 'timeout timeout)
|
||||
session)
|
||||
|
@ -161,7 +166,7 @@ (define* (open-ssh-session host #:key user port identity
|
|||
(raise (condition
|
||||
(&message
|
||||
(message (format #f (G_ "SSH authentication failed for '~a': ~a~%")
|
||||
host (get-error session)))))))))
|
||||
host (get-error session)))))))))))
|
||||
(x
|
||||
;; Connection failed or timeout expired.
|
||||
(raise (condition
|
||||
|
|
Loading…
Reference in a new issue