SSH config: host specific identity
Introduction
Using the features of the
config
file of
ssh
in
~/.ssh
one can specify host specific ssh options, including varying identities and users.
from:
http://www.gelato.unsw.edu.au/archives/git/0611/31044.html
Example:
- connecting to a specific host using a different identity file and user
$> cat ~/.ssh/config
Host private.host.com
User myname
Hostname host.com
IdentityFile ~/.ssh/private-identity
Host public.host.com
User anotherName
Hostname host.com
IdentityFile ~/.ssh/public-identity
Host git.host.com
User git
Hostname host.com
IdentityFile ~/.ssh/git-identity
- allows to replace:
--
PeterZumbruch - 10 May 2013