all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* tramp "Enter passphrase for key"
@ 2010-07-22 14:00 Gary
  2010-07-22 14:46 ` Michael Albinus
  2010-07-22 14:48 ` Bastian Beischer
  0 siblings, 2 replies; 7+ messages in thread
From: Gary @ 2010-07-22 14:00 UTC (permalink / raw)
  To: help-gnu-emacs

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?




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp "Enter passphrase for key"
  2010-07-22 14:00 tramp "Enter passphrase for key" Gary
@ 2010-07-22 14:46 ` Michael Albinus
  2010-07-22 14:48 ` Bastian Beischer
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Albinus @ 2010-07-22 14:46 UTC (permalink / raw)
  To: Gary; +Cc: help-gnu-emacs

Gary <help-gnu-emacs@garydjones.name> writes:

> 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?

Could you, please, provide more details? A trace would be helpful,
setting tramp-verbose to 6 first.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp "Enter passphrase for key"
  2010-07-22 14:00 tramp "Enter passphrase for key" Gary
  2010-07-22 14:46 ` Michael Albinus
@ 2010-07-22 14:48 ` Bastian Beischer
  2010-07-22 16:48   ` Michael Albinus
  2010-07-22 17:04   ` Gary .
  1 sibling, 2 replies; 7+ messages in thread
From: Bastian Beischer @ 2010-07-22 14:48 UTC (permalink / raw)
  To: Gary; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1875 bytes --]

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 <help-gnu-emacs@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

[-- Attachment #2: Type: text/html, Size: 2705 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp "Enter passphrase for key"
  2010-07-22 14:48 ` Bastian Beischer
@ 2010-07-22 16:48   ` Michael Albinus
  2010-07-22 17:04   ` Gary .
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Albinus @ 2010-07-22 16:48 UTC (permalink / raw)
  To: Bastian Beischer; +Cc: help-gnu-emacs, Gary

Bastian Beischer <bastian.beischer@rwth-aachen.de> writes:

> 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.

Usually, Tramp knows ssh_agent, and asks for a *passphrase* then. At
least under GNOME, which I use.

On more modern systems, gnome-keyring is involved, which is also fine.

> Cheers
> Bastian

Best regards, Michael.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp "Enter passphrase for key"
  2010-07-22 14:48 ` Bastian Beischer
  2010-07-22 16:48   ` Michael Albinus
@ 2010-07-22 17:04   ` Gary .
  2010-07-23  4:13     ` Michael Albinus
  1 sibling, 1 reply; 7+ messages in thread
From: Gary . @ 2010-07-22 17:04 UTC (permalink / raw)
  To: help-gnu-emacs

On 7/22/10, Bastian Beischer wrote:
> 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/...

I don't know why you would think that. I only run in the "console"
(well, Cygwin, which is inside Windows, so... mmm... whatever!)

Not sure of the values. Will post them tomorrow.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp "Enter passphrase for key"
       [not found] <mailman.1.1279807234.15903.help-gnu-emacs@gnu.org>
@ 2010-07-23  2:34 ` Tim X
  0 siblings, 0 replies; 7+ messages in thread
From: Tim X @ 2010-07-23  2:34 UTC (permalink / raw)
  To: help-gnu-emacs

Gary <help-gnu-emacs@garydjones.name> writes:

> 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?
>
>

When you say you have ssh working fine from the console with kyes, I
assume you are using an ssh agent so that the first time you try to ssh
to a remote host, a window pops up asking for your ssh key passphrase.
Once entered, any further onnections work without having to re-enter
your pass key. Right?

How are you starting emacs? How are you starting the ssh agent?

My guess is that you are starting your ssh agent as part of your
xsession startup, but your starting emacs via a menyu option. If this is
the case, whay may be happening is that emacs is not running as a child
process of your xsession process. This will mean that it cannot access
the ssh agent. 

For the ssh agent to work, it must be started in a parent process of the
process you want to run ssh from. 

One way to verify this would be to run emacs from inside a console
rather than from a menu or launcher. Try the following 0

ssh to the remote host from a console session. If allworks correctly,
logout fromt he remote host and then type emacs at the prompt. Once
emacs is running, try using tramp and see if it works. If it does, then
this is almost certainly your problem, in which case, what you need to
do is see how to get the ssh agent running in a process that will be a
parent process tot he one that is launched when you execute emacs from
the menu or launcher. How you do this will depend on your distribution,
window manager and launcher setup. 

Tim

-- 
tcross (at) rapttech dot com dot au


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp "Enter passphrase for key"
  2010-07-22 17:04   ` Gary .
@ 2010-07-23  4:13     ` Michael Albinus
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Albinus @ 2010-07-23  4:13 UTC (permalink / raw)
  To: Gary .; +Cc: help-gnu-emacs

"Gary ." <help-gnu-emacs@garydjones.name> writes:

> I only run in the "console" (well, Cygwin, which is inside Windows,
> so... mmm... whatever!)
>
> Not sure of the values. Will post them tomorrow.

That's a known problem then. Tramp and Cygwin have never been friends,
see <http://www.gnu.org/software/tramp/#Windows-setup-hints>.

I recommend to use plink instead of ssh under Windows.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-07-23  4:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-22 14:00 tramp "Enter passphrase for key" Gary
2010-07-22 14:46 ` Michael Albinus
2010-07-22 14:48 ` Bastian Beischer
2010-07-22 16:48   ` Michael Albinus
2010-07-22 17:04   ` Gary .
2010-07-23  4:13     ` Michael Albinus
     [not found] <mailman.1.1279807234.15903.help-gnu-emacs@gnu.org>
2010-07-23  2:34 ` Tim X

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.