ksnowlv

回顾过去,总结以往;立足现在,铭记当下;技术为主,笔记而已.

Mac下支持多个ssh-key

| Comments

Mac下如何支持多个ssh-key呢?

通过ssh-config文件配置各个ssh-key,避免在mac重启后,每次手动添加ssh-key。

配置文件config如下:

1
2
3
4
5
6
7
8
9
10
11
12
Host           gitee.com
HostName       gitee.com
User            ksnowlv@163.com
PreferredAuthentications publickey
IdentityFile    ~/.ssh/ksnowlv163


Host           10.103.40.101
HostName       10.103.40.101
User            git
PreferredAuthentications publickey
IdentityFile    ~/.ssh/id_rsa

Comments

comments powered by Disqus
Included file 'custom/after_footer.html' not found in _includes directory