From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastian Beischer Newsgroups: gmane.emacs.help Subject: Re: tramp "Enter passphrase for key" Date: Thu, 22 Jul 2010 16:48:20 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001485f039c674005c048bfb02f4 X-Trace: dough.gmane.org 1279810335 11708 80.91.229.12 (22 Jul 2010 14:52:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Jul 2010 14:52:15 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Gary Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 22 16:52:13 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Obx88-0005Wu-66 for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Jul 2010 16:52:12 +0200 Original-Received: from localhost ([127.0.0.1]:44910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Obx86-0006M9-Pg for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Jul 2010 10:52:10 -0400 Original-Received: from [140.186.70.92] (port=46899 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Obx4S-0004c2-2I for help-gnu-emacs@gnu.org; Thu, 22 Jul 2010 10:48:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Obx4Q-0005Xu-LW for help-gnu-emacs@gnu.org; Thu, 22 Jul 2010 10:48:23 -0400 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:44460) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Obx4Q-0005Xd-Ba for help-gnu-emacs@gnu.org; Thu, 22 Jul 2010 10:48:22 -0400 Original-Received: by fxm20 with SMTP id 20so4856414fxm.0 for ; Thu, 22 Jul 2010 07:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=KxYJbv3dKdVikCFNLeWeyXKcJ8/UkNxwv9qRkwuRO8E=; b=effl4MqDXYAg4LkDEpHAiL8CsdeaiTOnjmOdjydOeL8dlUbD6mOCv4futipA01W7ZU 6rHSFIiSDhTNW6Fe56oiIS7lrMTYJ62w32rkHvrKEmN7jkby11xa6r2xatRQ3nfxwT7t PD8txnAdNHjnMOmfgvYSCYjW1FGMyI4Tzo3q8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=QyyjbTIPB/x0rjyxXs0YAqNl3uO7KK5CHNq7fnVDI5SAsvLRj8gOpZQDokI5paM9gD LnZfT8J6LDjePIGTIqfQyG3lxEwZRY6jBDjRyDoFhebLgdZA8hQrtBbhvrcsZs/ofx3w m1JhRkgvxcWHdDUfuxkYYfE7QtxckM0X1j2FY= Original-Received: by 10.239.157.10 with SMTP id o10mr208956hbc.24.1279810101050; Thu, 22 Jul 2010 07:48:21 -0700 (PDT) Original-Received: by 10.239.150.78 with HTTP; Thu, 22 Jul 2010 07:48:20 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: X_aeBq_SvH1fH1k5RUMPeEfTSK8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:74237 Archived-At: --001485f039c674005c048bfb02f4 Content-Type: text/plain; charset=ISO-8859-1 What are your values of M-x getenv SSH_AGENT_PID M-x getenv SSH_AUTH_SOCK ? I assume that your problem is that these variables are only set in terminals but not in programs started from GNOME/KDE/... (where .bashrc and the like are not sourced). Hence, tramp will not know anything about the ssh-agent and prompt you for the password. In that case you should try to find a way to make your ssh-agent known to the session. For example, I am using KDE, and there is a script in /etc/kde/env/ with the following content: $ cat /etc/kde/env/agent-startup.sh # Agents startup file # # This file is sourced at kde startup, so that # the environment variables set here are available # throughout the session. # Uncomment the following lines to start gpg-agent # and/or ssh-agent at kde startup. # If you do so, do not forget to uncomment the respective # lines in KDEDIR/shutdown/agent-shutdown.sh to # properly kill the agents when the session ends. if [ -x /usr/bin/gpg-agent ] && [ -z "${GPG_AGENT_INFO}" ]; then eval "$(/usr/bin/gpg-agent --daemon --pinentry-program /usr/bin/pinentry-qt4)" fi # if [ -x /usr/bin/ssh-agent ] && [ -z "${SSH_AGENT_PID}" ]; then eval "$(/usr/bin/ssh-agent -s)" fi and a similar script to shut the agents down. Cheers Bastian On Thu, Jul 22, 2010 at 4:00 PM, Gary wrote: > I have ssh from the console setup to use authentication using > keys. Works fine. > > Tramp on the other hand... > > Well, after the event I do see the requests to "Enter passphrase for > key" but I am not actually prompted for them when I try to open a file > on the remote host. Instead I am just asked for a login password. Any > idea what is going on and how to fix it? > > > -- Bastian Beischer I. Physikalisches Institut B (RWTH Aachen) Sommerfeldstr. 14 52074 Aachen GERMANY Office: 28-C-203 Phone: +49 241 - 8027205 --001485f039c674005c048bfb02f4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable What are your values of

M-x getenv SSH_AGENT_PID
M-x getenv SSH_AUTH_SOCK

?
I assume t= hat your problem is that these variables are only set in terminals but not = in programs started from GNOME/KDE/... (where .bashrc and the like are not = sourced).
Hence, tramp will not know anything about the ssh-agent and prompt you= for the password. In that case you should try to find a way to make your s= sh-agent known to the session.
For example, I am using KDE, and t= here is a script in /etc/kde/env/ with the following content:

$ cat /etc/kde/env/agent-startup.sh=A0
#= Agents startup file
#
# This file is sourced at kde st= artup, so that
# the environment variables set here are available=
# throughout the session.

# Uncomment the fol= lowing lines to start gpg-agent
# and/or ssh-agent at kde startup= .
# If you do so, do not forget to uncomment the respective
# lines in KDEDIR/shutdown/agent-shutdown.sh to
# properly k= ill the agents when the session ends.

if [ -x /usr= /bin/gpg-agent ] && [ -z "${GPG_AGENT_INFO}" ]; then
=A0=A0eval "$(/usr/bin/gpg-agent --daemon --pinentry-program /usr= /bin/pinentry-qt4)"
fi=A0
#
if [ -x /usr= /bin/ssh-agent ] && [ -z "${SSH_AGENT_PID}" ]; then
=
=A0=A0eval "$(/usr/bin/ssh-agent -s)"
fi

and a similar script to shut the agents down.
Cheers
Bastian


On Thu, Jul 22, 2010 at 4:00 PM, Gary <help-gnu-ema= cs@garydjones.name> wrote:
I have ssh from the console setup to use authentication using
keys. Works fine.

Tramp on the other hand...

Well, after the event I do see the requests to "Enter passphrase for key" but I am not actually prompted for them when I try to open a file=
on the remote host. Instead I am just asked for a login password. Any
idea what is going on and how to fix it?





--
Bastian Beischer
I. Physikalisches Institut B (RWTH Aachen)
Sommerfeldstr. 14
52074 = Aachen
GERMANY

Office: 28-C-203
Phone: +49 241 - 8027205

--001485f039c674005c048bfb02f4--