guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/04: ssh: Also print the user when authentication fails.


From: guix-commits
Subject: 04/04: ssh: Also print the user when authentication fails.
Date: Tue, 22 Aug 2023 05:19:16 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit e318b62df361624e3bac70f658bcf5600ba5ca79
Author: Attila Lendvai <attila.lendvai@gmail.com>
AuthorDate: Sat Jul 29 14:02:37 2023 +0200

    ssh: Also print the user when authentication fails.
    
    * guix/ssh.scm (open-ssh-session): Show user in error message.
    
    Co-authored-by: Ludovic Courtès <ludo@gnu.org>
---
 guix/ssh.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/guix/ssh.scm b/guix/ssh.scm
index b7b9807ebf..c4617d2c74 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -175,8 +175,9 @@ to SSH server at '~a'")
              (disconnect! session)
              (raise (condition
                      (&message
-                      (message (format #f (G_ "SSH authentication failed for 
'~a': ~a~%")
-                                       host (get-error session)))))))))))
+                      (message (format #f (G_ "SSH authentication failed for 
'~a@~a': ~a~%")
+                                       (session-get session 'user) host
+                                       (get-error session)))))))))))
       (x
        ;; Connection failed or timeout expired.
        (raise (formatted-message (G_ "SSH connection to '~a' failed: ~a~%")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]