Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    Actually no you don't. ssh automatically uses ~/.ssh/id_rsa (or id_dsa) without having to use a key agent. Commented Nov 7, 2013 at 1:29
  • 13
    This can still be helpful advice if one was to specify a differently named key in ~/.ssh/config (e.g. on host *.mydomain.org...IdentityFile ~/.ssh/some_limited_use.pub -- ssh-add ~/.ssh/some_limited_use.pub). Commented Feb 3, 2014 at 12:11
  • 1
    This has solved my problem with getting password prompt after adding a key. As 89c3b1b8-b1ae-11e6-b842-48d705 pointed out, the reason to run these commands manually was a non-standard name of a key file. Commented Sep 18, 2018 at 11:40
  • 2
    As pointed out by above in the comments, if you are using any key besides the default key, it is not added by default to the ssh agent. So be sure to check the key you want to use is in the agent's keychain: ssh-add -L Commented Mar 11, 2019 at 17:58
  • 1
    I had to do ssh-add ~/.ssh/id_rsa Thanks a ton! Commented Apr 13, 2020 at 11:59