From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Peter_M=C3=BCnster?= Newsgroups: gmane.emacs.help Subject: Re: tramp and ssh-key passphrase Date: Mon, 29 Feb 2016 13:49:45 +0100 Message-ID: <87y4a3wuja.fsf@roche-blanche.net> References: <87fuwcykn3.fsf@heimdali.yagibdah.de> <87povflvw7.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1456750237 1730 80.91.229.3 (29 Feb 2016 12:50:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Feb 2016 12:50:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 29 13:50:26 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aaNHN-0002t8-Ei for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 13:50:25 +0100 Original-Received: from localhost ([::1]:36381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaNHJ-0003bj-KT for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 07:50:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaNH1-0003ZI-7X for help-gnu-emacs@gnu.org; Mon, 29 Feb 2016 07:50:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaNGx-0002Vt-7V for help-gnu-emacs@gnu.org; Mon, 29 Feb 2016 07:50:03 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:57751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaNGx-0002Va-0D for help-gnu-emacs@gnu.org; Mon, 29 Feb 2016 07:49:59 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aaNGr-0002hE-VI for help-gnu-emacs@gnu.org; Mon, 29 Feb 2016 13:49:54 +0100 Original-Received: from arennes-651-1-139-147.w2-2.abo.wanadoo.fr ([2.2.82.147]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Feb 2016 13:49:53 +0100 Original-Received: from pmlists by arennes-651-1-139-147.w2-2.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Feb 2016 13:49:53 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 55 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: arennes-651-1-139-147.w2-2.abo.wanadoo.fr User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:MhLS1E3kBiDxJ07YqL/M4BElSwo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109370 Archived-At: --=-=-= Content-Type: text/plain On Mon, Feb 29 2016, Michael Albinus wrote: > There is the recommendation to use ssh-agent, which is always good. Indeed. And if - you want to type the passphrase only once at the start of your X-session - and your ssh-passphrase is the same as your gpg-passphrase - and the passphrase should never expire - and ssh-connections should work from cron-jobs, then you could - copy the attached askpass.lisp file to ~/bin - and fill the list of the fingerprints - and copy the attached gpg-agent.conf to ~/.gnupg - and put these 2 lines to your ~/.xinitrc: SSH_ASKPASS=~/bin/askpass.lisp ssh-add echo $SSH_AUTH_SOCK >~/.ssh/ssh-auth-sock - and start your cron-job shell scripts with export SSH_AUTH_SOCK=`cat ~/.ssh/ssh-auth-sock` -- Peter --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=askpass.lisp Content-Transfer-Encoding: base64 IyEvdXNyL2Jpbi9zYmNsIC0tc2NyaXB0Cgo7OyB2aWVsbGVpY2h0IHNvOgo7OyBncGcgLS1saXN0 LXNlY3JldC1rZXlzIC0td2l0aC1maW5nZXJwcmludCAtLXdpdGgtZmluZ2VycHJpbnQgLS13aXRo LWNvbG9uCjs7IC0tbGlzdC1vcHRpb25zIG5vLXNob3ctdW51c2FibGUtdWlkcyxuby1zaG93LXVu dXNhYmxlLXN1YmtleXMgfCBzZWQgLXJuICdzL15mcHI6Ojo6Ojo6OjooLiopOi9cMS9wJwoKKGRl ZnZhciAqZmluZ2VycHJpbnRzKgogIChsaXN0ICJYWFgiCiAgICAgICAgIllZWSIKICAgICAgICAi WlpaIikpCgood2l0aC1vdXRwdXQtdG8tc3RyaW5nIChvdXQpCiAgKHJ1bi1wcm9ncmFtICIvdXNy L2xpYi9zc2gvc3NoLWFza3Bhc3MiIG5pbCA6b3V0cHV0IG91dCkKICAobGV0ICgocyAoZ2V0LW91 dHB1dC1zdHJlYW0tc3RyaW5nIG91dCkpKQogICAgKGRvbGlzdCAoZnAgKmZpbmdlcnByaW50cyop CiAgICAgICh3aXRoLWlucHV0LWZyb20tc3RyaW5nIChpbiBzKQogICAgICAgIChydW4tcHJvZ3Jh bSAiL3Vzci9saWI2NC9ncGctcHJlc2V0LXBhc3NwaHJhc2UiIChsaXN0ICItLXByZXNldCIgZnAp CiAgICAgICAgICAgICAgICAgICAgIDppbnB1dCBpbiA6b3V0cHV0IG5pbCkpKQogICAgKHByaW5j IHMpKSkK --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=gpg-agent.conf allow-preset-passphrase default-cache-ttl 99999999 max-cache-ttl 99999999 --=-=-=--