Windows 10 SSH keys

后端 未结 11 1774
难免孤独
难免孤独 2020-12-12 14:57

I am having a really hard time getting my SSH keys up and running after installing Windows 10. Normal method is create it and throw it in the user\'s account under .ssh. T

11条回答
  •  被撕碎了的回忆
    2020-12-12 15:13

    2019-04-07 UPDATE: I tested today with a new version of windows 10 (build 1809, "2018 October's update") and not only the open SSH client is no longer in beta, as it is already installed. So, all you need to do is create the key and set your client to use open SSH instead of putty(pagent):

    1. open command prompt (cmd)
    2. enter ssh-keygenand press enter
    3. press enter to all settings. now your key is saved in c:\Users\.ssh\id_rsa.pub
    4. Open your git client and set it to use open SSH

    I tested on Git Extensions and Source Tree and it worked with my personal repo in GitHub. If you are in an earlier windows version or prefer a graphical client for SSH, please read below.

    2018-06-04 UDPATE:

    On windows 10, starting with version 1709 (win+R and type winver to find the build number), Microsoft is releasing a beta of the OpenSSH client and server. To be able to create a key, you'll need to install the OpenSSH server. To do this follow these steps:

    1. open the start menu
    2. Type "optional feature"
    3. select "Add an optional feature"
    4. Click "Add a feature"
    5. Install "Open SSH Client"
    6. Restart the computer

    Now you can open a prompt and ssh-keygen and the client will be recognized by windows. I have not tested this. If you do not have windows 10 or do not want to use the beta, follow the instructions below on how to use putty.


    ssh-keygen does not come installed with windows. Here's how to create an ssh key with Putty:

    1. Install putty
    2. Open PuttyGen
    3. Check the Type of key and number of bytes to use
    4. Move the mouse over the progress bar
    5. Now you can define a passphrase and save the public and private keys

    For openssh keys, a few more steps are required:

    1. copy the text from "Public key for pasting" textbox and save it as "id_rsa.pub"
    2. To save the private key in the openssh format, go to Conversions->Export OpenSSH key ( if you did not define a passkey it will ask you to confirm that you do not want a pass key)
    3. Save it as "id_rsa"

    Now that the keys are saved. Start pagent and add the private key there ( the ppk file in Putty's format)

    Remember that pagent must be running for the authentication to work

提交回复
热议问题