To copy ssh keys from Windows, use the mnt
folder in which you will find your Windows partitions.
cp -r [PATH_TO_SSH_KEYS_FOLDER_WINDOWS] ~/.ssh
For example, for the .ssh
folder which is stored by default in C:\Users\<username>\.ssh
you would write:
cp -r /mnt/c/Users/<username>/.ssh ~/.ssh
If you try to push something using Git, you might get a warning message that it doesn't recognize the remote host. If you type yes
in the Bash prompt you will get an error saying WARNING: UNPROTECTED PRIVATE KEY FILE!
.
This is because, by default, the keys stored will have chmod 755
. To fix this, just type:
chmod -R 600 ~/.ssh/