From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#49714: 28.0.50; TRAMP burns CPU and has insufficient user reporting when using xxxx-sk SSH keys Date: Sat, 24 Jul 2021 14:02:10 +0200 Message-ID: <87sg03apj1.fsf@gmx.de> References: <87o8asu1mg.fsf@jpl.nasa.gov> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1972"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 49714@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 24 14:03:23 2021 Return-path: Envelope-to: geb-bug-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 1m7GNH-0000LQ-3P for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Jul 2021 14:03:23 +0200 Original-Received: from localhost ([::1]:41288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7GNG-0006S7-23 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Jul 2021 08:03:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7GMw-0006Rv-Gy for bug-gnu-emacs@gnu.org; Sat, 24 Jul 2021 08:03:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7GMw-0008WG-AE for bug-gnu-emacs@gnu.org; Sat, 24 Jul 2021 08:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m7GMw-0005SX-8F for bug-gnu-emacs@gnu.org; Sat, 24 Jul 2021 08:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Jul 2021 12:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49714 X-GNU-PR-Package: emacs Original-Received: via spool by 49714-submit@debbugs.gnu.org id=B49714.162712814320936 (code B ref 49714); Sat, 24 Jul 2021 12:03:02 +0000 Original-Received: (at 49714) by debbugs.gnu.org; 24 Jul 2021 12:02:23 +0000 Original-Received: from localhost ([127.0.0.1]:45332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7GMJ-0005Rc-6w for submit@debbugs.gnu.org; Sat, 24 Jul 2021 08:02:23 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:37155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7GMH-0005RP-Df for 49714@debbugs.gnu.org; Sat, 24 Jul 2021 08:02:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1627128132; bh=RyNkNQYuqHfMMa5Bs1oKc2dRXsEKycYcDv/Xux9579c=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=jhoWKipMOC4bdSUTqE+l09LY407X7WrD48E2742J+0slJKD5SgWEgcZdCEFUiTSYT CivpWXAIA9V9c+SYUU7zxgk/SLRcP17ZagkklPQnDzgVlfk0ZpQ0m8Xu2br2d2qbD6 TKBKcLY7q2edkJSCPhebZdAMUOa8lkVlRjTRds2A= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.149.95]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MmlT2-1lOtWs0Wk2-00jonO; Sat, 24 Jul 2021 14:02:12 +0200 In-Reply-To: <87o8asu1mg.fsf@jpl.nasa.gov> (Dima Kogan's message of "Fri, 23 Jul 2021 15:05:59 -0700") X-Provags-ID: V03:K1:abxTdpS55B019j8bddwH9/R6hOhpqbkqZi2EJZy9hxGM9nbRx32 SsCJGU41tVdcwzKjVuLkotmfbaLk9xVp6F8dQ633d7Xq5ZCjXQSdL+rya4BMqG9zzHPhbWK DZUjHs/8gCKpkrnOKxYcCWoCMIGjAQYZsk/81E+vltLc+CKogzPsc59PHE4LThv5ppjPi+9 Uqf2uJ6x/++aXYSv/1wRg== X-UI-Out-Filterresults: notjunk:1;V03:K0:hhBkAshOlT0=:mI5rUB2Zc1Tl7NrWbPghUI OTVCsmj21KXEk3dkk60Stme5dj5NCOGMzsVpBjZ+yF9Sj4Oxd5rH+2D2TVjJssQl4sSZpzuPO sedg7MpPjQKh68XNCE5kL+fUJoanEGU1f+lcf9I1dHdi3873D0+C2YK9SmTZnCi4wCXkaeSIp HzQ+/VktbGd/KclGDajB5qYVfMpEtXS/JOy8R7tOK/IIFfHxPnsrjmI6nqHHXQzYAhkyjlVAy 05Eh4tT+4VZGS4KZqTzHTnsLEbGfM19llMCRYO0f4me/hL6nX4jokUD/jh23HvTeRhObG/Yd/ iYV0q3UE00PxT+G6C2LTH0WW8EqVfBRnRkfcmZZnFO15UU64kR9z78KNMEBvdgtBI4/Wwy+ZN TRllqG7tLLgBZhDaL1FP6z8WHkmhEZIGcCRNim1ABKIFWDJu0gURrIbH0tMknoJHHe+G8Fe8F 53YPMBAas1t9V9Jv19Ra7oTn2K3cn/gnldUZB8ZKNah8fNEzYG1xT8TUhi2u56Lg1PSmB2ZOz l0lptLujaWxrtaddm1mfSyuw5IZ+3uW4C/tpRIPR3Or+aHyKvwzbp2ywXVhsPMdgdjhBtsOXG tF4UpytkIXgjLg7XRSL5yaQRwrVM+2PjEnpU1AbaWc9bnRjF7g8eIEeADbXfWPOmUtNJWFPPT KlAeIUOZgzinmwkwSV9GOyOsJV70BHK/zYj3Ln9ZpNThhTpFX1scyWeFIlwfBylfC9hAhRRae /Ra9Ws+4gGJnCNdPfplIhBHV7Wh+4KgPmpeFnx0ik2B+jMZ836TjNAGVsaV17Mk0hOTjpY9P X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:210633 Archived-At: Dima Kogan writes: > Hi. Hi Dima, > I have a yubikey, a hardware encryption device. For the purposes of SSH, > the SSH private key is split betweek a file on disk (.ssh/id_ed25519_sk) > and some data on the yubikey. Great! I'm planning for a while to implement support of yubikey, but I never started to buy a device. I herewith declare you as my tester :-) > When logging into an SSH server, the > interaction generally looks like this: > > client$ ssh ADDRESS > > Enter passphrase for key '/home/dima/.ssh/id_ed25519_sk': > [the user enters the passphrase; not echoed to the console] > > Confirm user presence for key ED25519-SK XXXXXXXXXXXXXXX > [the user physically touches the yubikey with their finger] > > server$ > [we are logged-in] Good. This should be sufficient information. > Emacs now spins the CPU, saying nothing. Internally, ssh is asking for > the user to touch the yubikey, but TRAMP is not communicating this > information. I know I should touch the yubikey, and if I do that, TRAMP > succeeds. There are two bugs here: > > 1. Emacs should not be spinning the CPU. This is actually an old bug. I > usually see this with normal SSH connections, but it only happens > during the login sequence, which isn't very long. In THIS case the > login sequence could be longer. In any case, we shouldn't be > spinning. Not so simple. Tramp is in a loop, reading the process output, and checking, whether there is something it has to handle (for example, password requests). This loop runs until Tramp detects the remote shell prompt. > 2. Emacs should relay whatever ssh is saying (i.e. "Confirm user > presence...") to the user I've implemented this for yubikey, pushed to master. Could you pls try? Showing everything during the login handshake wouldn't be helpful, Tramp is doing TRT in the background for the vast majority of actions. > Thanks! Best reagards, Michael.