From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: GUEZ Lionel Newsgroups: gmane.emacs.help Subject: tramp access to ssh agent Date: Tue, 11 Oct 2022 21:41:53 +0200 Message-ID: <20221011214153.37b51138@fozzy> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24351"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 12 11:16:38 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiXqu-00063H-WE for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 12 Oct 2022 11:16:37 +0200 Original-Received: from localhost ([::1]:46484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiXqt-0003mU-Oe for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 12 Oct 2022 05:16:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiL8c-0002d4-Bb for help-gnu-emacs@gnu.org; Tue, 11 Oct 2022 15:42:02 -0400 Original-Received: from smtp6-g21.free.fr ([212.27.42.6]:27842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiL8Z-0007za-T0 for help-gnu-emacs@gnu.org; Tue, 11 Oct 2022 15:42:01 -0400 Original-Received: from fozzy (unknown [IPv6:2a01:e34:ec1d:680:1ce0:8234:e501:c095]) by smtp6-g21.free.fr (Postfix) with ESMTP id 2BD4978034D for ; Tue, 11 Oct 2022 21:41:54 +0200 (CEST) X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Received-SPF: softfail client-ip=212.27.42.6; envelope-from=guez@lmd.ipsl.fr; helo=smtp6-g21.free.fr X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 12 Oct 2022 05:11:53 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:139846 Archived-At: Hello. I am using GNU Emacs 27.1 on Linux Mint 21. I am experiencing a problem that I did not have with my previous setup: Emacs 26.3 on Linux Mint 20.3. I have an SSH key, protected by a passphrase, that I use to connect to a remote host. As the key is in my .ssh directory with a standard name, it is automatically detected and unlocked at login by gnome-keyring-daemon. So when I ssh to the remote host from a terminal, the ssh agent provides the passphrase and I do not have to enter it. Now here is the strange part. When I try to connect to the remote host from Emacs, Emacs may or may not ask me the passphrase. It seems to depend on how long ago I logged in. If I try the connection in Emacs immediately after login, Emacs does not ask me the passphrase, and Emacs never asks the passphrase from then on in this session. If I try the connection in Emacs for the first time in my session, say, a few hours after login, Emacs asks me the passphrase. So it seems that tramp has access to the ssh agent or not depending on how long has elapsed since login. Note that there is no such problem from the Gnome terminal. Even when Emacs asks me the passphrase, the terminal does not. The ssh agent is here (I see it in the list of processes) and the terminal has access to it. Does anybody understand this? Is there a timeout period after which gnome-keyring is not able to communicate with Emacs? And why is this different in Linux Mint 20.3 and 21? --=20 Lionel GUEZ Laboratoire de m=C3=A9t=C3=A9orologie dynamique =C3=89cole normale sup=C3=A9rieure 24 rue Lhomond, 75005 Paris