How to get a second copy of ssh keys

sammyboy123 51 Reputation points
2021-01-07T16:29:23.71+00:00

I have an azure linux VM and had a pair of keys. Those keys are on a seperate computer than the one I ussually use. How do I get a second copy of the keys?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,014 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andriy Bilous 11,821 Reputation points MVP Volunteer Moderator
    2021-01-07T18:03:23.567+00:00

    Hello @sammyboy123
    Unfortunately you cannot get a copy of the private key if it is lost for example.
    https://serverfault.com/questions/183664/recover-an-ssh-private-key

    Concept of SSH-keys is described here
    https://www.ssh.com/ssh/key/

    You can only regenerate new key pair(private and public keys) and reset SSH configuration on Linux VM with new public key

    54541-image.png

    https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshoot-ssh-connection

    There is a possibility to store SSH keys in Azure Portal, so you can downloaded it on any of your local machines.
    https://learn.microsoft.com/en-us/azure/virtual-machines/ssh-keys-portal

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.