SSH keys have numerous advantages over passwords. Just send them your public key. Default location ( /home/your_username/.ssh/id_rsa on Linux, or /Users/your_username/.ssh/id_rsa on Mac) if you don't already have a key installed,. I have a Mac running Lion at home. I disabled password ssh login; I just want to use public key. I generated private/public key pair, but now I'm confused.
![Mac copy ssh public key Mac copy ssh public key](/uploads/1/2/5/2/125248523/201371027.png)
My question is do I have to create a separate private key from my imac or can I just copy the private key from my macbook?
Do you have to create separate private keys? No, but there are reasons why you might want to.
The biggest one is the fact that if any key is compromised, they are all compromised (since they are the same). Say, for example, your MacBook is lost or stolen. You really should consider disabling the MacBook's key from authorized_keys to prevent the finder/thief from getting into your server. If that one key is shared by multiple hosts, though, you're going to lock out all the other hosts as well, even though they haven't been affected.
Having separate keys per client lets you nix just the key for the MacBook (or whichever machine) without impacting the other machines' ability to connect.
Other than the trivial amount of work it takes to create a private key there's really no overhead in having unique keys per client machine. If, however, you really want them to be the same, knock yourself out 🙂