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

TheFrack
  • 191
  • 1
  • 2
  • 12

2 Answers2

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

DukeLion
  • 3,239
  • 1
  • 17
  • 19
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.

TheFrack
  • 191
  • 1
  • 2
  • 12