Automatic entry of SSH passphrase

Asked by KnB

I recently installed Jaunty on a new laptop, and there is some behaviour that seems to have changed from 8.10.

In 8.10, I was prompted for my ssh passphrase the first time that I tried to connect to my server. I clicked the option that was there (forget the exact wording) so that I would not be prompted for it again. Then, whenever I would ssh to my server (in a terminal), some application would provide the passphrase for me, and I would not have to type it in.

In Jaunty, when I ssh to my server, I must enter the ssh passphrase every time. I would like to get it working like Intrepid, but am not sure how.

Can some one shed some light on the programs involved, and how I need to set them up to make Jaunty behave the way Intrepid did?

Thanks,

K

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bryan Basil (bryanlbasil) said :
#1

Hello, KnB. :-)

For automatic authentication, you should use public-key authentication with ssh-agent. To use ssh-agent, first get public-key authentication working without it, so that SSH works but you must enter your key passphrase each time you connect.

Then simply type:

  % eval `ssh-agent`
  % ssh-add <private key file> # e.g. ~/.ssh/id_RSA
  % ssh-add -l

If all goes well, the last command should list the key you've added to the key agent, and your SSH commands in this shell have access to your key without further intervention from you.

I hope I've been of some help.

Do post here and tell me whether it works?

Best to you, and good luck. :-)

Revision history for this message
KnB (ubuntu-thebarters) said :
#2

Thanks for getting me on the right path.

Your solution works, but I need to enter the commands each time I log in.

I did some futher googling with ssh-agent and gnome, and found this thread that describes the same issue I am having:
http://ubuntuforums.org/showthread.php?t=1145017

There is no solution there though.

It seems to be an issue with gnome-keyring and ssh.

Any other ideas?

Thanks,

K

Revision history for this message
Bryan Basil (bryanlbasil) said :
#3

Hmm...

Well, that's all I knew how to do, so I talked to my good friend Google, and he pointed me here:
http://blogs.translucentcode.org/mick/archives/000230.html

The downside to this tutorial is that it certainly removes a bit of security. It is better, though, than some of the "passwordless login" tutorials I've seen, because they basically create a file called "Hack_me_now.sh" :-)

I really hope I've helped, but I'm not sure of what else we can try here. I was really hoping that my first post would do the trick.

Anyway, keep me posted. Best to you, and good luck.

Can you help with this problem?

Provide an answer of your own, or ask KnB for more information if necessary.

To post a message you must log in.