2

Not sure how or why, but ssh-agent lost all saved passwords. How can I re-add them?

I would like it if when connecting over SSH to type the password then and have ssh-agent remember it from there on.

I use a config file for different hosts and as far as I remember I didn't have to ssh-add for any of the entries there but rather type the password once and then the agent remembered it.

Thank you.

1
  • 2
    Git questions are quite welcome here, but since this isn't really Git-specific, I'm voting to move it over to SU where you'll probably get better answers. Commented Jan 24, 2012 at 23:52

1 Answer 1

1

If you are using a shell which didn't get created by the same shell as the one which spawned ssh-agent, then you need to set some env variables so ssh knows which agent to query.

They are displayed when you run ssh-agent for easy import into a new shell.

See http://mah.everybody.org/docs/ssh for more details.

Sign up to request clarification or add additional context in comments.

2 Comments

So, I added all my keys' passwords to ssh-agent which gets started when Git Bash runs. It remembers them, but once I restart my laptop, it don't know them anymore.
ssh-agent is not supposed to remember your passphrases across reboots. If you want ssh keys without passphrases, just create them without passphrases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.