Home > Uncategorized > The many ways SSH keygen can fail on you under Windows

The many ways SSH keygen can fail on you under Windows

March 2nd, 2010

Just learned about the many ways SSH keygen can fail on you under Windows, today.

First of all, I should have told you to just press Enter when SSH keygen bothers you with questions. If you just keep on pressing Enter everything will go fine. So either you delete your keys and redo it with all Enter, or you try to fix it manually.

So your key files should be called id_rsa and id_rsa.pub and be in the C:\cygwin\home\joe\.ssh folder, where joe is your username. And then it should be accessible by you and only you. Both of which might get wrong if you manually rename and move the files.

To check that the file names are correct, please make sure you show file extensions in Windows Explorer. You set this in the extras menu under options and then in the view tab. There “hide extensions of known file types” should not be checked.

Next if you see this error message

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/home/joe/.ssh/id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /home/joe/.ssh/id_rsa

should fix the access rights of your files. To fix this type

chmod 600 /home/joe/.ssh/id_rsa

this will limit access to your private key to you and yourself only. (For the curious minds man chmod tells you more about the chmod command).

akuhn Uncategorized

Comments are closed.