Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to pull from Github all the time and I have a passphrase, but it's a pain, so I typically run...

ssh-agent bash
ssh-add ~/.ssh/id_rsa
<prompt and give passphrase>
git pull
...

And that works for the session, but even after I logout, I would like it to save the passphrase next time I PuTTY in. So I installed keychain, but I'm too dumb to operate it. So now when I login, I type...

ssh-agent bash (Which I'm guessing causes bashrc to load and then keychain loads)
git pull
...

How would I make it so I don't need to call "ssh-agent bash" every time I login?

I'm using ArchLinux...

share|improve this question
    
Which platform are you doing this on? What is 'keychain'? Is it OS X's Keychain? –  Martijn Heemels May 16 '12 at 21:29
    
This howto describes what you're trying to do: cyberciti.biz/faq/… –  Martijn Heemels May 16 '12 at 21:35

2 Answers 2

Use Putty's ssh agent - Pageant for your private keys and enable agent forwarding. http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter9.html

share|improve this answer
up vote 0 down vote accepted

Okay this is the best I could come up with...

Install keychain...

Then add the following to ~/.bashrc file:

eval `keychain --eval id_rsa`

THEN add the following to ~/.bash_profile:

ssh-agent bash

That will start keychain. It isn't as simple as just putting both in the bash profile or bashrc file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.