Saving ssh key fails
If you prefer to use a GUI to create the keys
- Use Putty Gen to generate a key
- Export the key as an open SSH key
- As mentioned by @VonC create the .ssh directory and then you can drop the private and public keys in there
- Or use a GUI program (like Tortoise Git) to use the SSH keys
For a walkthrough on putty gen for the above steps, please see http://ask-leo.com/how_do_i_create_and_use_public_keys_with_ssh.html
It looks like you are executing that command from a DOS session (see this thread), and that means you need to create the .ssh
directory before said command.
Or you can execute it from the bash session (part of the msysgit distribution), and it should work.
If you're using Windows, the unix-style default path of ssh-keygen is at fault.
In Line 2 it says Enter file in which to save the key (/c/Users/Eva/.ssh/id_rsa):
.
That full filename in the parantheses is the default, obviously Windows cannot access a file like that. If you type the Windows equivalent (c:\Users\Eva\.ssh\id_rsa
), it should work.
Before running this, you also need to create the folder. You can do this by running mkdir c:\Users\Eva\.ssh
, or by created the folder ".ssh." from File Explorer (note the second dot at the end, which will get removed automatically, and is required to create a folder that has a dot at the beginning).
c:\Users\Administrator\.ssh>ssh-keygen -t rsa -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/Administrator/.ssh/id_rsa): C:\Users\Administrator\.ssh\id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in C:\Users\Administrator\.ssh\id_rsa.
Your public key has been saved in C:\Users\Administrator\.ssh\id_rsa.pub.
The key fingerprint is:
... [email protected]
The key's randomart image is:...`
I know this is an old thread, but I thought the answer might help others.