1

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...

1

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

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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