Use a specific SSH key with a domain

- Development, Open Source, Resources

You are a developer but you don’t want to share your key with hosting for safety but also to enable others to easily access.

If you have different keys for every domain it’s important to say to SSH that you want a specific key.

So take a moment with this example:

We have a key named domain_dsa for domain.com but you have no idea how to add it.

Put that file where you prefer and change the file config in ~/.ssh/ adding that rule:

Now SSH for that domain will use that key also if you have other dsa keys in the folder.

Pretty cool, right?

Source: https://www.cyberciti.biz/faq/force-ssh-client-to-use-given-private-key-identity-file/

All the stuff released in this website, where the author is Daniele Scasciafratte, is under the GPL 2.0 license except when the resources have their licenses.

Leave a Reply