From: Michael Albinus <michael.albinus@gmx.de>
To: Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: tramp and ssh-agent / ssh-add
Date: Sun, 30 Mar 2008 13:12:25 +0200 [thread overview]
Message-ID: <878x00a2jq.fsf@gmx.de> (raw)
In-Reply-To: <m3tzipnibg.fsf@tfkp07.physik.uni-erlangen.de> (Roland Winkler's message of "Sun, 30 Mar 2008 01:53:23 +0100")
Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> writes:
Hi,
> Usually when I have emacs running on a remote machine, I do this as
> a subprocess of ssh-agent. Then when I establish ssh connections
> via tramp, I want to make sure that I type my password only once via
> ssh-add. What is the cleanest way to do that? Is there some support
> from tramp for that? Right now, my home-made solution uses a
> defadvice for tramp-open-connection-rsh, see the code below.
> However, if tramp-open-connection-rsh is the right entry point for
> what I want to do, it seems to me that a hook might be helpful. Or
> am I missing something else?
I wouldn't do it this way:
- You advice tramp-open-connection-rsh, a function of Tramp 2.0. It
doesn't exist anymore in Tramp 2.1, so you solution isn't future safe.
- I believe that calling ssh-add on-the-fly is not the intended way. You
should call it, before you run emacs "as a subprocess of ssh-agent" on
the remote machine.
- Tramp supports password caching on its own. Install password.el in
your own lisp directory. You could download it from <http://cvs.savannah.gnu.org/viewvc/*checkout*/tramp/contrib/password.el?revision=1.1.2.1&root=tramp&pathrev=branch-2-0-stable>.
Then you add the following line to your .emacs, after loading Tramp:
(setq password-cache-expiry nil)
> Thanks,
>
> Roland
Best regards, Michael.
next prev parent reply other threads:[~2008-03-30 11:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-30 0:53 tramp and ssh-agent / ssh-add Roland Winkler
2008-03-30 11:12 ` Michael Albinus [this message]
[not found] ` <mailman.9631.1206875452.18990.help-gnu-emacs@gnu.org>
2008-03-30 12:28 ` Roland Winkler
2008-03-30 13:54 ` Michael Albinus
2008-03-30 14:25 ` Roland Winkler
2008-03-30 15:30 ` Michael Albinus
2008-03-30 15:38 ` Roland Winkler
2008-03-30 15:56 ` Michael Albinus
2008-04-01 0:17 ` Mike Mattie
[not found] ` <mailman.9640.1206887118.18990.help-gnu-emacs@gnu.org>
2008-03-31 7:44 ` Tim X
2008-03-31 10:26 ` Michael Albinus
[not found] ` <mailman.9696.1206959167.18990.help-gnu-emacs@gnu.org>
2008-03-31 21:04 ` Roland Winkler
2008-04-01 0:19 ` Mike Mattie
[not found] ` <mailman.9752.1207009209.18990.help-gnu-emacs@gnu.org>
2008-04-01 3:15 ` Roland Winkler
2008-04-05 4:38 ` Tim X
2008-04-07 4:32 ` Roland Winkler
2008-04-07 8:56 ` Peter Dyballa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878x00a2jq.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=Roland.Winkler@physik.uni-erlangen.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).