官术网_书友最值得收藏!

Generating your SSH key on Windows

As Windows does not have a fully functioning terminal, we have to take some other steps to install Git and generate our SSH key. We will take a look at how this is done in this recipe.

How to do it…

  1. Go to Windows.
  2. The download will start automatically. When it's done, you see the following installation window:
  3. Click on Next and accept the license agreement.
  4. Choose where you want to install Git and click on Next.
  5. You will want the following components to be selected:
    • Windows Explorer integration
    • Associate .git* configuration files with the default text editor
    • Associate .sh files to be run with Bash

    After selecting the preceding components, click on Next. The following screenshot shows you these options:

  6. Choose where you want to place Git in your start menu and click on Next.
  7. Choose Use Git from Git Bash only and click on Next.
  8. Select Checkout Windows-style, commit Unix-style line endings, and click on Next.
  9. Wait until the installation is done and click on Finish.
  10. Go to your start menu and open Git Bash. This will open the following terminal window:
  11. To generate your SSH key, enter the following command:
    ssh-keygen
    
  12. When asked for the location at which you want to save the file, just press Enter.
  13. Enter a secure passphrase for your SSH key.
  14. Your SSH key is now generated, as shown in the following screenshot:

How it works…

As Windows doesn't come with a built-in Git setup, we have to install it ourselves. We also have to install Git Bash so that we can use Git via the command line.

One thing that is important while creating your SSH key is to remember to enter a passphrase. We use an SSH key because we believe that passwords are less secure. So, you might think that if you're using an SSH key, you will be safe. That's not entirely true. When a person takes control over your private key, they have access to every system you have put your public key in. However, when you use a passphrase for your SSH key, not only do they have to steal your private key, but also know the password that goes with it.

主站蜘蛛池模板: 藁城市| 西和县| 博客| 临颍县| 深泽县| 衡南县| 峨眉山市| 沧州市| 岐山县| 武汉市| 噶尔县| 南郑县| 永清县| 炉霍县| 昂仁县| 宜宾县| 太仓市| 治县。| 澜沧| 辽中县| 白沙| 扶绥县| 五莲县| 张家川| 曲松县| 深水埗区| 米林县| 白朗县| 石城县| 绵竹市| 三原县| 延吉市| 五大连池市| 宁化县| 临朐县| 清原| 临朐县| 富顺县| 米脂县| 内黄县| 连州市|