SVN+SSH, not having to do ssh-add every time? (Mac OS)

后端 未结 7 604
傲寒
傲寒 2020-11-29 17:00

I know the answer is out there, but I\'m pretty Unix-dumb and probably wouldn\'t recognize the solution if it hit me in the face.

I\'m on a Mac, connecting to a SVN

7条回答
  •  有刺的猬
    2020-11-29 17:14

    After much exploration, I think I've found the answer to this issue completely. First, make sure you do ssh-add -K ~/.ssh/your_key_here. This adds the key to your keychain. Some places, I have read that this is enough, but I wasn't certain. This is also mac-specific, so if you need to do this on another unix flavor, you won't have this option necessarily.

    For good measure, I edited the ~/.ssh/config file (you may have to create it) to point to all the keys I have. Mine has the following:

    IdentityFile ~/.ssh/identity
    IdentityFile ~/.ssh/id_rsa
    IdentityFile ~/.ssh/id_dsa 
    IdentityFile ~/.ssh/my_other_identity_here
    IdentityFile ~/.ssh/yet_another_identity_here
    

    According to the man page for ssh_config, it will try these in order. I'm not sure if the first three default ones I have listed need to be there, but I have included them anyway.

提交回复
热议问题