Skip to content

Ferdinand Agyei-Yeboah

Using SSH config files

August 07, 2020

Are you tired of passing in your private key and user on every ssh connection?

ssh -i ~/.ssh/example_private_key.rsa user@hostname.com

Then just create a user ssh configuration file ~/.ssh/config. For example.

Host github
HostName github.com
User git
IdentityFile ~/.ssh/example_private_key.rsa

Now you can just type.

ssh github

Which will internally translate to ssh -i ~/.ssh/example_private_key.rsa git@github.com


Software Engineering Tutorials & Best Practices