Let’s say we are connecting to a server on Rackspace, and generate a public SSH key on my MacBook pro with my username Justin. We then add Justin’s public SSH key to the server on Rackspace, and presto we can now connect without a password.
What happens if I take Justin’s public SSH key, put it on my iMac, and try to connect to the Rackspace server from this new computer? Will this still work?
If not, what about if I go back to my MacBook Pro, but instead of being logged in as Justin, I am logged in as Mike, and try to use Justin’s public SSH key to connect to the Rackspace server from Mike’s account. Again what happens?
Basically, do SSH keys only work from the machine and account they were generated on?
No, they are not tied to a computer.
You should regenerate a new ssh key anyway so you can disable it if your computer gets stolen. It would really suck if you lost your one and only SSH key if you lost your computer.