[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tramp and ssh-key passphrase
From: |
Jorge A. Alfaro-Murillo |
Subject: |
Re: tramp and ssh-key passphrase |
Date: |
Fri, 18 Mar 2016 16:21:11 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
lee writes:
"Loris Bennett" <loris.bennett@fu-berlin.de> writes:
Try setting up an SSH agent. That way you just have to enter
the passphrase once per session.
Thanks, I tried, and it only says
,---- | Could not add card ".ssh/[...]": agent refused operation
`----
You are supposed to have a key in your .ssh, if not do something
like
#+BEGIN_SRC shell
cd ~/.ssh
ssh-keygen -t rsa -b 4096 -o -a 100
#+END_SRC
You would then have to copy the content of id_rsa.pub into
~/.ssh/authorized_keys of the machine you want to login onto.
when I try to add a key, so I killed it. The agent had been
started with
,---- | eval $(ssh-agent) `----
in my .xinitrc.
This is awful because it requires me to exit the X session to
get the ssh-agent to work. I won't do much experimenting on
this ...
You should only start the ssh-agent once per session, that is the
whole point of it. Actually it should start automatically.
You can try:
#+BEGIN_SRC shell
killall ssh-agent
eval `ssh-agent -s`
#+END_SRC
Then do
#+BEGIN_SRC shell
ssh-add
#+END_SRC
right after you login. It will ask for the password of your id_rsa
key, and then let you connect for the rest of your session.
Best,
--
Jorge.