Configure SSH to Use Keyfiles Automatically

If you have multiple SSH-keys, perhaps a different one to each server, this can make your life a lot easier. Less typing is better.

Or perhaps you are configuring a remote git repository, or access through some other software.

Go ahead and

nano ~/.ssh/config

And add

Host example.com
IdentityFile ~.ssh/yourkey

Change the domain and filename of your key to the proper values.

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.