Azure DevOps Server 2019 Cookbook(Second Edition)
上QQ阅读APP看书,第一时间看更新

How it works...

Let's go through the steps to understand how this works: 

  1. The SSH key setup process prompts you to validate the fingerprint on the SSH public key the first time you use it, this is for your own protection to avoid any malicious use. When you run git clone to clone using the SSH URL of the Git repository, you will be prompted to verify that the SSH fingerprint for the server you are connecting to. This is done to protect you from the man-in-the-middle attacks, you can learn more about this at this link at https://technet.microsoft.com/en-us/library/cc959354.aspx. Once you accept the host's fingerprint, SSH will not prompt you again unless the fingerprint changes.
  2. The ssh-keygen command creates a 2,048-bit RSA key for use with SSH. The command gives you an option to add a passphrase for your private key—this provides another layer of security for your private key. If you specify a passphrase, be sure to configure the SSH agent to cache your passphrase so that you don't have to enter it every time you connect.
  3. The ssh-keygen command in the preceding example has been run with the -c switch. This allows you to add a comment field in the key file – for convenience to the user to help identify the key. The comment can tell what the key is for, or whatever is useful. The comment is initialized to user@host when the key is created, but can be changed using the -c option.