I like to upload my public key (eg: ~/.ssh/id_rsa.pub) to various servers that I connect to on various networks for work. I use this same public key on Github. If I am on a shared user account and I put my public key there, can someone just take it and do something unfavorable with it? Is it generally not a wise idea to just have 1 Public key that you share amongst several servers?
The public key is meant to be disclosed to remote systems. So assuming your key pair is of adequate length, uploading the public key to remote hosts is safe. Only your private key needs to be protected, and that is normally done using the operating system's file permissions facilities as well as a passphrase.
That said, using the same key pair for multiple hosts makes it more difficult to replace if that key is ever compromised, or even if you simply want to replace it on a regular basis to maintain good security hygiene.
As long as everything goes well, it won't be a problem to use the same key pair for multiple hosts or services, but unless you have a specific need to do it that way, I would suggest using different key pairs for each host and/or service. You can specify which key file should be used on a per-host basis through your ~/.ssh/config (see
And if you are on a shared user account at work, lobby to fix that. Shared user accounts make it nearly impossible to properly secure access and data, and to after the fact see who did something. In fact, I'd argue that there's your problem, not using a SSH key pair for multiple hosts. There are very few questions to which the answer is shared user accounts.