From patchwork Tue Jul 2 00:16:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jakob L. Kreuze" X-Patchwork-Id: 14452 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 819FD17193; Tue, 2 Jul 2019 04:10:51 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 4BDED17191 for ; Tue, 2 Jul 2019 04:10:51 +0100 (BST) Received: from localhost ([::1]:47834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hi9By-00020f-OA for patchwork@mira.cbaines.net; Mon, 01 Jul 2019 23:10:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57958) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hi6sh-0006wV-1p for guix-patches@gnu.org; Mon, 01 Jul 2019 20:42:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hi6sH-000540-3z for guix-patches@gnu.org; Mon, 01 Jul 2019 20:42:46 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37510) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hi6Tl-0007qV-To for guix-patches@gnu.org; Mon, 01 Jul 2019 20:17:33 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hi6Tl-0004uN-O5 for guix-patches@gnu.org; Mon, 01 Jul 2019 20:17:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36404] [PATCH 1/4] ssh: Add 'identity' keyword to 'open-ssh-session'. Resent-From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 02 Jul 2019 00:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36404 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 36404-submit@debbugs.gnu.org id=B36404.156202658218817 (code B ref 36404); Tue, 02 Jul 2019 00:17:01 +0000 Received: (at 36404) by debbugs.gnu.org; 2 Jul 2019 00:16:22 +0000 Received: from localhost ([127.0.0.1]:46331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hi6T5-0004tP-Kk for submit@debbugs.gnu.org; Mon, 01 Jul 2019 20:16:22 -0400 Received: from mx.sdf.org ([205.166.94.20]:56364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hi6T3-0004tD-Qh for 36404@debbugs.gnu.org; Mon, 01 Jul 2019 20:16:18 -0400 Received: from Upsilon (mobile-107-107-57-169.mycingular.net [107.107.57.169]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x620GEbf004314 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO); Tue, 2 Jul 2019 00:16:16 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) References: <87o92ianbj.fsf@sdf.lonestar.org> <87o92glap5.fsf@dustycloud.org> <878sthoqzi.fsf@gnu.org> <87imsl9tsx.fsf_-_@sdf.lonestar.org> Date: Mon, 01 Jul 2019 20:16:13 -0400 In-Reply-To: <87imsl9tsx.fsf_-_@sdf.lonestar.org> (Jakob L. Kreuze's message of "Mon, 01 Jul 2019 20:14:22 -0400") Message-ID: <87ef399tpu.fsf_-_@sdf.lonestar.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 36404@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/ssh.scm (open-ssh-session): Add 'identity' keyword argument --- guix/ssh.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/guix/ssh.scm b/guix/ssh.scm index 9b9baf54e..9bf10b9a0 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -57,12 +57,14 @@ (define %compression "zlib@openssh.com,zlib") -(define* (open-ssh-session host #:key user port +(define* (open-ssh-session host #:key user port identity (compression %compression)) - "Open an SSH session for HOST and return it. When USER and PORT are #f, use -default values or whatever '~/.ssh/config' specifies; otherwise use them. -Throw an error on failure." + "Open an SSH session for HOST and return it. IDENTITY specifies the path of +a private key to use for authenticating with the host. When USER, PORT, or +IDENTITY are #f, use default values or whatever '~/.ssh/config' specifies; +otherwise use them. Throw an error on failure." (let ((session (make-session #:user user + #:identity identity #:host host #:port port #:timeout 10 ;seconds