[PATCH] guix: Also print the user when SSH auth fails.

  • Done
  • quality assurance status badge
Details
3 participants
  • Attila Lendvai
  • Ludovic Courtès
  • Simon Tournier
Owner
unassigned
Submitted by
Attila Lendvai
Severity
normal
A
A
Attila Lendvai wrote on 29 Jul 2023 14:02
(address . guix-patches@gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
5e86c8256e44eb5516631fc455c6c4d1de271eb1.1690632156.git.attila@lendvai.name
---

i have added this when i was debugging a guix deploy issue,
and i thought it should be useful for others, too.

guix/ssh.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (23 lines)
diff --git a/guix/ssh.scm b/guix/ssh.scm
index b7b9807ebf..91d61fc3c0 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -175,8 +175,8 @@ (define* (open-ssh-session host #:key user port identity
(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~%")
+ user host (get-error session)))))))))))
(x
;; Connection failed or timeout expired.
(raise (formatted-message (G_ "SSH connection to '~a' failed: ~a~%")

base-commit: e43cbeafd1b632f39b08b3644af5230d5350a656
prerequisite-patch-id: 6793c8ad24215c5f14ce71a4741fff5f6ccd7eeb
prerequisite-patch-id: 3a8dd737d11f37987641af9bc7f512a0bb1a1591
prerequisite-patch-id: f6456f2bf0b7b078318d16b958c14816eb45ace5
prerequisite-patch-id: 52e0d371350dbeb839990acd0bbe70bc5b5b995b
--
2.40.1
S
S
Simon Tournier wrote on 16 Aug 2023 18:43
87v8dfdjk4.fsf@gmail.com
Hi,

On Sat, 29 Jul 2023 at 14:02, Attila Lendvai <attila.lendvai@gmail.com> wrote:

Toggle quote (5 lines)
> - (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~%")
> + user host (get-error session)))))))))))

This LGTM. Is it possible that ’user’ is not set?

Cheers,
simon
L
L
Ludovic Courtès wrote on 22 Aug 2023 11:07
Re: bug#64930: [PATCH] guix: Also print the user when SSH auth fails.
(name . Simon Tournier)(address . zimon.toutoune@gmail.com)
87pm3f5ttd.fsf_-_@gnu.org
Hi,

Simon Tournier <zimon.toutoune@gmail.com> skribis:

Toggle quote (9 lines)
> On Sat, 29 Jul 2023 at 14:02, Attila Lendvai <attila.lendvai@gmail.com> wrote:
>
>> - (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~%")
>> + user host (get-error session)))))))))))
>
> This LGTM. Is it possible that ’user’ is not set?

Right, USER can be #f. I fixed this and applied it.

Thanks Attila & Simon!

Ludo’.
Closed
?