Suresh Payankannur

Friday, April 25, 2014

Using different credentials with ssh-agent

When using ssh directly, you can use the -i <identity-file> option to specify different key files. But when using programs like git which uses ssh under the covers, it is not possible to directly specify a different key file. In such situations, ssh-agent can be used to supply the required identity for any programs running within the context.
ssh-agent bash
ssh-add <private-key-file>
git push


Post a Comment

Blog Archive

Scroll To Top