unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Tomas Volf <~@wolfsden.cz>
Cc: "Josselin Poiret" <dev@jpoiret.xyz>,
	"Tobias Geerinckx-Rice" <me@tobias.gr>,
	"Simon Tournier" <zimon.toutoune@gmail.com>,
	"Mathieu Othacehe" <othacehe@gnu.org>,
	"Ludovic Courtès" <ludo@gnu.org>,
	74832@debbugs.gnu.org, "Christopher Baines" <guix@cbaines.net>
Subject: bug#74832: guix copy incorrectly assumes port is 22
Date: Thu, 19 Dec 2024 11:33:17 +0900	[thread overview]
Message-ID: <87ikrgmmfm.fsf_-_@gmail.com> (raw)
In-Reply-To: <a3e2370fc79301d5de4aa242a3a81083d28cebb0.1734031864.git.~@wolfsden.cz> (Tomas Volf's message of "Thu, 12 Dec 2024 20:31:04 +0100")

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




      reply	other threads:[~2024-12-19  2:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 16:45 bug#74832: guix copy incorrectly assumes port is 22 Dariqq
2024-12-12 17:35 ` Tomas Volf
2024-12-12 19:31 ` bug#74832: [PATCH] guix: Do not default to 22 ssh port (let guile-ssh do it) Tomas Volf
2024-12-19  2:33   ` Maxim Cournoyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ikrgmmfm.fsf_-_@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=74832@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=guix@cbaines.net \
    --cc=ludo@gnu.org \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    --cc=~@wolfsden.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).