Chinaunix首页 | 论坛 | 博客
  • 博客访问: 269461
  • 博文数量: 52
  • 博客积分: 1278
  • 博客等级: 中尉
  • 技术积分: 627
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-26 12:46
文章分类

全部博文(52)

文章存档

2013年(1)

2012年(51)

分类: 系统运维

2012-11-07 16:04:10

Even if the user and host are the same, they can still be distinguished in ~/.ssh/config. For example, if your configuration looks like this:

Host  gitolite-as-alice
  HostName git.company.com
  User git
  IdentityFile /home/whoever/.ssh/id_rsa.alice

Host gitolite-as-bob
  HostName git.company.com
  User git
  IdentityFile
  /home/whoever/.ssh/id_dsa.bob

Then you just use gitolite-as-alice and gitolite-as-bob instead of the hostname in your URL:

git remote add alice git@gitolite-as-alice:whatever.git git remote add bob git@gitolite-as-bob:whatever.git

原文地址:

 
阅读(3108) | 评论(0) | 转发(0) |
0

上一篇:ssh 免密码登陆

下一篇:linux运维常用命令

给主人留下些什么吧!~~