Question

Is there a way to reuse my existing ssh key on one linux machine on a PC with Ubuntu OS,am trying to access gerrit on a Ubuntu OS PC and as expected ssh connection needs to be established.

I don’t want to run generate a new ssh key with my email id as it might mess-up my current ssh connection, how to proceed forward? any inputs

Thanks

Was it helpful?

Solution

You can copy your older ssh keys to the new machine.

Basically, copy your ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub files to this new machine at same location, and you should be able to ssh in all right. You might need to explicitly specify the user account you want to ssh into like ssh user@server.

Also, you might want to go through more answers on reusing ssh keys.

OTHER TIPS

Just make sure you don't have different permissions for the id_rsa and the id_rsa.pub files compared to what the system would generate.

I transferred the keys and did not work for me.

But when I changed permissions to:

  • id_rsa -> read/write by owner
  • ir_rsa.pub -> read/write by owner + read by group + read by others

All worked. Previously I had extra permissions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top