From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id GERFMcTpY2dl4gAA62LTzQ:P1 (envelope-from ) for ; Thu, 19 Dec 2024 09:39:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id GERFMcTpY2dl4gAA62LTzQ (envelope-from ) for ; Thu, 19 Dec 2024 10:39:16 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=YlvlFaux; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=jf9BH5wF; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=nqHk8GsB; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=wolfsden.cz (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734601156; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=f77zT9Z0PtV84eyc6W1KeF2eFP2cMEx0pO1ImkYpatA=; b=khud6wTw2yM+M38oGKf38hzg3TNqLKgKiYLn7BJ1C/BVadNwHzzDW6mOpjYeokGawqE4Fi veMe5qfBoJxS0nFJyL748rMbDwC/DAqUDIOzSCD6r6OKMfBQtbEMCa+F8hNeOCAFS1O1w8 nBk3Bc77vV4hwdNT1UDtBDmSeU6D8Y/DqV4uJ+0VhcgL0+1cOsm3mZ0aUvWlJKqtnMI0+c u45mEQdClw/SXxHk7E4mYOOaLFIa83imUC/L5i7H98BKS3n1XYTIYpLUSM0XXdD41bgOs0 uCxdNuGbFCknvalfE1No4ra4AUfTdC261ABqCSqJObRWCOKWBFdhhXwbUDAEHA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=YlvlFaux; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=jf9BH5wF; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=nqHk8GsB; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=wolfsden.cz (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734601156; a=rsa-sha256; cv=none; b=PTVH+A7CU3th6+trTmmzmw+ncyNX4DktEU7RQ2P5CH3LkVJx59L+cPALI/xc68tvdFOo60 EX+4f65S1urS10nQlos6EeV493DsENzJTe2jxNWElBAuwj1umLqK/5mvTD7GjTLfiyp7h/ l/pMZvTvYnDK5i5DwkSo+HKrd9hyP4bpqY0nxJ0mvYbl0ma8LbGSp3KVS78y76T0tJsonx RWGi8Blu7qcBB7SUReHh4Ve2oRtC5Lw5GXAbGg9GFRbe9J8n/DcKal/9ZaDqdxV7lbAQC2 l6U63XHxPeNw4KLWHWArgYXag8fmgYrJ7q4qp2ZivlKzVJgFJhquA9JRhKdISw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8702825BDC for ; Thu, 19 Dec 2024 10:39:16 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOCs4-0000PG-J3; Thu, 19 Dec 2024 04:31:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOCs2-0000Ow-Qg for bug-guix@gnu.org; Thu, 19 Dec 2024 04:31:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOCs2-0001mD-HR for bug-guix@gnu.org; Thu, 19 Dec 2024 04:31:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=f77zT9Z0PtV84eyc6W1KeF2eFP2cMEx0pO1ImkYpatA=; b=YlvlFauxeF8ccdzxahFMTj2diNNFn2THG94ak7DxK9Zm5z08hhHhSeySHFD9Oe4vj7eK7oo7SVeyZBRRGa4koWqhxdaFCBVoyX2pKBarFo4AxS1cv/7OTdpkUrsc3sWVijPFsgjF5V6VvWUCpC+3KMo7bmQ+XsEWSpmwq+3I9VKpIa0KmADOHIAYiT0XpSkrjN/DOPEacpDdosKHFEk80rTZ0KpmuRX8PupfW+X6tmV9GPeg9ngl23FYElGs3zbF62HUENMQe2fHl/DdHRhE7Vc6OPUZxIxM5wziY57eY0mc+M356j/kISK07ddsSUhhHIVezZSr/3mk5V2r8K1vAg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOCs2-0005B9-Br for bug-guix@gnu.org; Thu, 19 Dec 2024 04:31:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#74832: guix copy incorrectly assumes port is 22 Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 19 Dec 2024 09:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74832 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: Josselin Poiret , Tobias Geerinckx-Rice , Simon Tournier , Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , 74832@debbugs.gnu.org, Christopher Baines Received: via spool by 74832-submit@debbugs.gnu.org id=B74832.173460064619877 (code B ref 74832); Thu, 19 Dec 2024 09:31:02 +0000 Received: (at 74832) by debbugs.gnu.org; 19 Dec 2024 09:30:46 +0000 Received: from localhost ([127.0.0.1]:37502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOCrm-0005AU-0k for submit@debbugs.gnu.org; Thu, 19 Dec 2024 04:30:46 -0500 Received: from wolfsden.cz ([37.205.8.62]:45212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tOCrj-0005AL-FQ for 74832@debbugs.gnu.org; Thu, 19 Dec 2024 04:30:44 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 913C2338D14; Thu, 19 Dec 2024 09:30:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1734600642; bh=JbqOM8Ch874b0nsNKfQTX7/9wrX3PJZDTK9DNVikZFk=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=jf9BH5wFS/ZecpqAoC1/NvHS9FMZauaS2Lxv7dBJhRf+Z1x6fuMpBf+sQ7EhaTRs+ X/5uoSPeJjmjAa1v8bXl7+x1xg2QElVFNpp1ffodxFnSXgejFNsMfqAJyx+zWo7wr+ /kh2DtQp1YyXrsKclW9e7uJhwl/H9zCDsatO5r+bGzPdIi93/3lWueGY2Ot/8lXl2Z RNRtUQXqhWYJk/Ma2DtuLyVN6ZM1ECpV8DKlM2w1NYj5J8acJrWWCBqoLYrtsruL/N 9+VHojzB5MD1J+m309YuoXaXJ7kJIEqSNLBNMstExjtEeG/LmUg8TMlGOuXU5U/t08 7NtH2elQlBmG1reb1Aya2BKYaJJBRhsWwsfcjM1uyt3xj64Cx4MjC9ld8vpRwkFK4o 97pyna+/0Ret0LMjloMLxoWYhJFxEdmAIp+4/iDCUFJcek4+g+/4xA+BrihUTFWVxr hPW1K7q1qmNt31MSPOy3oKTgf5Ro8myt3JMB4LEGLdvU6F35qReNL5+Hyfj9617iGb wNVvSID0ROZsKTv2FtVaDCH2wRGeuAwBAWbye7wplNrZEeIY8+8oIZMo4kCNZ/9G62 3ko0AdmmdVjQ7/1lKyNd19gi4b0QOv80XwEim+tUEj/JwlLdI+IaM9VC+UseXstd9V PE9ERYWGGmEykjdd1kQE+ilE= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 82F3037F1CE; Thu, 19 Dec 2024 09:30:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1734600640; bh=JbqOM8Ch874b0nsNKfQTX7/9wrX3PJZDTK9DNVikZFk=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=nqHk8GsBaJLq44unj0PDXWBZEpiZk9f8J9hU6pTHXa4d7AaEnMLYU2WzqGp9RMiuN /CGV/P+EFqQvXnHYsRv/0VQGHlRO5R8XU34Ssf8dgePQWr/pBmJhJ1ZBLe0oXVIdcv RuwEKYvE6bDudYy9Jyy9ejMTnhPT8oofLOeP6NAlZXyQ6mwBOZGdv7yBH0MQWw+aOd 1MO3vs4dwgzTsuRqG6BbSAalEzZR+6D0Br4tuyG1weD3d393525L5MBCDjQ63U2Jea CSWzRXOsUD1vgCfDhNvk+F93hZVEoPD/GRuX38zuZCYjzpvB5jCeoPHiB9kHd+sEXi Z8FSIv8HezBXlSjLYg+0JlJA1HHCGegtFY3YZ2RKWlhtyQ84U72HUJ4SpnKwGbKXrA kGXlye5tpjjfBFakqWTO3LrXvtwDTeQgsjvZvtv40iIeXbyQwhdeda9vupYfvxsiRV kqatqlyi/ECBQDnzUA8D7LjBO4hnFc51CPStwDEqGf1fQyMnIlhWtzbvaMEH4zA0PX VqZDJ9A75MZtE2RaVLXcWl0n2fqadOrrsYjMwkxlO3xhyDzA3pCKUNvcNL3fPq4nnF SFWDBvfFCf52adWhoekOvzQuLSTb3GhsE3F9ZKhD46EKNDLgm2i1RO1dcfMM5ld7hB SWQoUelM7j5Dsi/FAeMJhg7c= From: Tomas Volf <~@wolfsden.cz> In-Reply-To: <87ikrgmmfm.fsf_-_@gmail.com> (Maxim Cournoyer's message of "Thu, 19 Dec 2024 11:33:17 +0900") References: <87ikrgmmfm.fsf_-_@gmail.com> Date: Thu, 19 Dec 2024 10:30:39 +0100 Message-ID: <8734ik6mv4.fsf@wolfsden.cz> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -3.97 X-Spam-Score: -3.97 X-Migadu-Queue-Id: 8702825BDC X-TUID: ru3NGDadb/yn --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Maxim Cournoyer writes: > 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 place= s we >> however had code like `(or port 22)' leading to (in absence of alternati= ve >> port being specified) always using port 22, ignoring the configuration f= ile. >> >> Due to that for example following command fails: >> >> guix copy hello --to=3Dname >> >> Name is reachable, but ssh server listens on port 2222. That is correct= ly >> 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: > > Subject: [PATCH] Revert "copy: Default to port 22." > > This reverts commit cc1dfc202f2fefb6c2eb9467d1fc90a9154550c9. Specifying= a > default port had the undesirable effect of disregarding a port specificat= ion > for a given host in the ~/.ssh/config that would otherwise have been hono= red > 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 se= ssion > to 22 if left unspecified. > > > But, Ludovic had mentioned that without it, > > [...] "%p" would be "0" when using "ProxyCommand" in ~/.ssh/config. > > 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 :-). I wonder whether VM is necessary. I added the following to my ~/.ssh/config file: =2D-8<---------------cut here---------------start------------->8--- host name port 2222 proxycommand echo %p >/tmp/port =2D-8<---------------cut here---------------end--------------->8--- Then I executed guix copy: =2D-8<---------------cut here---------------start------------->8--- $ guix copy hello --to=3Dname guix copy: error: SSH connection to 'name' port 2222 failed: Socket error: = Connection reset by peer =2D-8<---------------cut here---------------end--------------->8--- And after that I checked /tmp: =2D-8<---------------cut here---------------start------------->8--- $ cat /tmp/port=20 2222 =2D-8<---------------cut here---------------end--------------->8--- So it seems to work fine? Would not hurt if someone double checked (with the patch above applied). Tomas =2D-=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmdj578OHH5Ad29sZnNk ZW4uY3oACgkQL7/ufbZ/wamP6Q/7B4ikDK1ixCco6JTps/lxAI5Vs36yeS3hbjHH BrxvNT8b1HbdIY2yXkM81AIPbYaEnZ8mRUPLmDbyMD4Byrz47YmF1xbhUyS+WUg0 PM5STiimR4Uh87XuKaH9EwclTsg1ic7eBHRA7BqveSbY7BdE/y3C3m8evvg+ak7f TTdbnYg0MZFEkZ1Fd8P4i1DpXaPyFS9xD4XFH+ND4dOFK10rFHUpAzRvZYKhAs3z 9AgrtlwSP74e7czUCGzhkyaCcNOu7lWdzgDLu1kxaZ08CxXqFOkeRPWLm7h8M0/v TdLeru7h3KSeJGHPF/aLx9eFYohVKZLlV9KHIRDc/a788DmWPNHMEcnq9wPWyYSI kUSR62xoS1n5enwMou0FdC2UhrdBKOW3mXo09lNU73+871kXMwjNDa0eFe67cwAW bt4eJN6d/bololtI3wJuRa549fmVCSmfMw1Dq6g8NauisA5+QbQdoCMVWVpZMggz Go/+yKhR88uX1XHhq2rWqGj0V7LIppXYS1N/VVlu1ROXH8+VAbgeqDTryVykrnjI BJDbcBqVRQeOQ7/NVsSGmca8SI2q5vB/VQ0lEl6P2vRUMhoot8Kumr0nTrghXEhr zKdQ/VZb19yYgS6unIAkIbOI5mgmbN+Vd5WXvQQ+qtKOzzD5MTIducfsEtfYNuyx hS1+49s= =JWzT -----END PGP SIGNATURE----- --=-=-=--