1

This question already has an answer here:

I have a program required by work installed on a Debian Wheezy box. Previously I was using Mac OS X (switch details irrelevant). I have an SSH keypair at ~/.ssh/id_rsa{.pub}. That keypair has a password on it.

The program I run for work uses executes a loop. That loop invokes SSH multiple times. Each trip through, I'm asked for my password for the private key again. On OS X, this happened only once per boot, regardless of uptime.

I want to get this to where I can input my ssh key password ONCE and have it accepted immediately every single time the key is invoked for the remainder of the machine's uptime (like how it's done on OS X).

I am NOT using a gui. No xwin here. This is a server installation.

Multiple searches have turned up only garbage introducing people to the concept of SSH keys. This is a bit more unique. Please point me at the right command so I can read the man page.

marked as duplicate by l0b0, Volker Siegel, garethTheRed, Anthon, Nils Oct 14 '14 at 10:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    have you tried ssh-agent ? This is intended excatly for what you need. – Archemar Oct 14 '14 at 8:46
  • This is exactly what I needed, thank you! For future searchers, here's how I got this working on Debian Wheezy: echo "eval `ssh-agent`" >> ~/.bashrc echo "ssh-add" >> ~/.bashrc Logout, then log back in. On each login, it'll ask you for your password for the primary keys you have in ~/.ssh. The eval thing, while I dislike it, is useful because ssh-agent prints out (by default) the commands to set necessary environment variables for using ssh-add and ssh-agent in future commands. Thanks again, Archemar. To l0b0, I don't think this is a duplicate because the solution seems quite different. – The Dude Oct 14 '14 at 10:07
  • Bah how the hell do I mark this as answered by Archemar and give him credit that he most certainly deserves? I feel real friggin' smart today, folks... – The Dude Oct 14 '14 at 10:12

Browse other questions tagged or ask your own question.