GNU bug report logs - #74832
guix copy incorrectly assumes port is 22

Previous Next

Package: guix;

Reported by: Dariqq <dariqq <at> posteo.net>

Date: Thu, 12 Dec 2024 16:46:02 UTC

Severity: normal

Tags: patch

Merged with 33266

Full log


Message #18 received at 74832 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Tomas Volf <~@wolfsden.cz>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Ludovic Courtès <ludo <at> gnu.org>, 74832 <at> debbugs.gnu.org,
 Christopher Baines <guix <at> cbaines.net>
Subject: Re: bug#74832: guix copy incorrectly assumes port is 22
Date: Thu, 19 Dec 2024 11:33:17 +0900
Hi Tomas,

Tomas Volf <~@wolfsden.cz> writes:

> After update to guile-ssh 0.18.0, options passed to the `make-session'
> procedure now take precedence over the configuration file.  In few places we
> however had code like `(or port 22)' leading to (in absence of alternative
> port being specified) always using port 22, ignoring the configuration file.
>
> Due to that for example following command fails:
>
>     guix copy hello --to=name
>
> Name is reachable, but ssh server listens on port 2222.  That is correctly
> configured in ~/.ssh/config, and the invocation used to succeed until the
> upgrade.

That is curious, because I had reported the exact same problem 6 years
ago (!) in bug#33266 (now merged with this one), with a similar
solution:

--8<---------------cut here---------------start------------->8---
Subject: [PATCH] Revert "copy: Default to port 22."

This reverts commit cc1dfc202f2fefb6c2eb9467d1fc90a9154550c9.  Specifying a
default port had the undesirable effect of disregarding a port specification
for a given host in the ~/.ssh/config that would otherwise have been honored
at the time `open-ssh-session' calls the `session-parse-config!' method.

In any case, `make-session' will default the port value of the created session
to 22 if left unspecified.
--8<---------------cut here---------------end--------------->8---

But, Ludovic had mentioned that without it,

--8<---------------cut here---------------start------------->8---
[...] "%p" would be "0" when using "ProxyCommand" in ~/.ssh/config.
--8<---------------cut here---------------end--------------->8---

So it'd perhaps regress in another way; I want to retry the test I had
done then but I need to setup at least a VM with SSH to test.  If you
can beat me to that, all the better :-).

-- 
Thanks,
Maxim




This bug report was last modified 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.