Using SSH keys generated for other machine on another machine

Does anyone here know how i can use the SSH keys that i generated for some other machine using ssh-keygen on some other machine. Actually, i created the keys on vmware and now i want to use that same keys on my dual-boot Linux machine. Can anyone tell me the procedure to do that?

Although you say you used ssh-keygen to generate keys, you forgot to explain how you are expecting to use them to log on to a remote machine.

I believe there is a misunderstanding here of how key-based authentication works. You create keys for your user account in host A, then you can copy them from host A to host B, host C, etc. In any event, you use the exact same keys you generated in host A to connect to other hosts (assuming the same account exists in all of them).

On the other hand, if your question is how you can actually copy the keys from one host to another, you are not saying which distribution and version you are using, but you should look into ssh-copy-id.

Hope it helps!

1 Like