I mostly work on windows. I have a public\private key which I use with git source control(github n other repos). Now, I want to use same keys from a linux machine. I have setup a virtual machine on windows with ubuntu. Can I use the same keys? How do I copy them to the linux instance?
|
|
You do not want to share the same key with another machine. No, you don't, really. Each private key should be restricted to one user on one machine only. Do not copy private keys around, since by doing this you are exposing your key to an increased risk of it being stolen or inadvertently copied via untrusted channels, or left on untrusted storage devices. What you should do is generate a new key pair on the new machine, then transmit your second public key to github. Any decent SSH-based service that allows the use of PKI also allows you to store multiple public keys, github is no exception. Give suggestive names to each key (for SSH keys, they are in the form of "username@hostname") so that you know the device associated to each public key. This has the benefits of keeping your private keys safe, and you can revoke keys individually when only one of them is compromised. |
|||||||||||
|
|
-SCP (PuTTY) -Use a SMB share that's accessible to both machines and transfer it that way -FTP server Then you always have the "I have no idea what I'm doing" methods like uploading the key to google docs on the windows machine and then downloading it on the linux machine. |
|||
|
|
|
I like the first answer, use puttý´s scp tool, or also another easy way would be to copy the keys to flash drive from windows, and then connect the flash drive to the VM instead, if that is possible with your VM software. |
|||
|
|
|
Most virtual machines (e.g. VMWare, VirtualBox) support file shares between host and VM. Create a file share on the host, mount it in the VM and you have an easy way to share files between the two. If your key doesn't work, it's probably because it is actually a putty key. You need to use puttygen to export this into a ssh key. |
|||
|
|