unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 33266@debbugs.gnu.org
Subject: bug#33266: guix-copy: Honor the SSH port of a host when defined in ~/.ssh/config
Date: Thu, 08 Nov 2018 22:35:32 -0500	[thread overview]
Message-ID: <871s7u53ej.fsf@gmail.com> (raw)
In-Reply-To: <87o9b21ehv.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 06 Nov 2018 15:12:44 +0100")

Hello!

ludo@gnu.org (Ludovic Courtès) writes:

[...]

> This looks good, and indeed it’s an unintended consequence of commit
> cc1dfc202f2fefb6c2eb9467d1fc90a9154550c9.
>
> However, the log of commit cc1dfc had this:
>
>    Failing to do that, "%p" would be "0" when using "ProxyCommand"
>    in ~/.ssh/config.

Yeah, I had seen this message, but was doubting if it was still
valid. Helas, it seems so:

Given the ~/.ssh/config snippet (and configured machines):
--8<---------------cut here---------------start------------->8---
Host vm-host
     HostName 10.5.5.5
     User someuser
     
Host some-guest
     IdentityFile ~/.ssh/vm-host/id_rsa
     HostName some-guest
     User guest
     ProxyCommand ssh vm-host nc %h %p
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use (ssh session)
scheme@(guile-user)> (make-session #:host "some-guest")
$1 = #<session #<undefined>@some-guest:22 (disconnected) 11dffe0>
scheme@(guile-user)> (session-get $1 'host)
$2 = "some-guest"
scheme@(guile-user)> (session-get $1 'port)
$3 = 22
scheme@(guile-user)> (session-parse-config! $1 "~/.ssh/config")
$4 = #<undefined>
scheme@(guile-user)> (session-get $1 'port)
$5 = 22
scheme@(guile-user)> (connect! $1)
$6 = error
scheme@(guile-user)> (make-session #:host "some-guest" #:port 22)
$7 = #<session #<undefined>@some-guest:22 (disconnected) 11dffc0>
scheme@(guile-user)> (session-parse-config! $7 "~/.ssh/config")
$8 = #<undefined>
scheme@(guile-user)> (session-get $7 'port)
$9 = 22
scheme@(guile-user)> (connect! $7)
$10 = ok
--8<---------------cut here---------------end--------------->8---

> This is arguably a defect in either Guile-SSH or (more likely) libssh,
> and it would be nice to report it.
>
> Would you like to report it upstream?

It has to be in libssh. I'll try to come up with a repro in C, and
submit the issue to them.

When it's done, I'll add a note in the code.

To be continued... Thanks for looking :)

Maxim

  reply	other threads:[~2018-11-09  3:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05  4:58 bug#33266: guix-copy: Honor the SSH port of a host when defined in ~/.ssh/config Maxim Cournoyer
2018-11-06 14:12 ` Ludovic Courtès
2018-11-09  3:35   ` Maxim Cournoyer [this message]
2019-01-22 22:09     ` Ludovic Courtès

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=871s7u53ej.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=33266@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /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).