Help me troubleshoot SSH key authentication in Team Foundation Server
Questions and Troubleshooting
How can I have Git remember the passphrase for my key on Windows?
Run the following command included in Git for Windows to start up the ssh-agent process in Powershell or the Windows Command Prompt. ssh-agent will cache your passphrase so you don't have to provide it every time you connect to your repo.
If you are using the Bash shell (including Git Bash), start ssh-agent with:
> eval `ssh-agent`
I use PuTTY as my SSH client and generated my keys with PuTTYgen. Can I use these keys with Team Services?
Yes. Load the private key with PuTTYgen, go to Conversions menu and select Export OpenSSH key. Save the private key file and then follow the steps to set up non-default keys. Copy you public key directly from the PuTTYgen window and paste into the Key Data field in your security settings.
How can I verify that the public key I uploaded is the same key as I have locally?
You can verify the fingerprint of the public key uploaded with the one displayed in your profile through the following ssh-keygen command run against your public key using the bash command line. You will need to change the path and the public key filename if you are not using the defaults.
You can then compare the MD5 signature to the one in your profile. This is useful if you have connection problems or have concerns about incorrectly pasting in the public key into the Key Data field when adding the key to Team Services.
How can I test my SSH connection without running a Git command?
Run the following from the command prompt to test your connection:
> ssh -T firstname.lastname@example.org
You will replace email@example.com with the corresponding information from the clone URL from the repository, e.g. firstname.lastname@example.org if from the above example. You will see this output if successful:
Authentication for user with identifier "2ee0ba7b-fb11-44b3-b69e-33684597fbfb" was successful against account "fabfiber".
Shell is not supported.
How can I start using SSH in a repository where I am currently using HTTPS?
You'll need to update the origin remote in Git to change over from a HTTPS to SSH URL. Once you have the SSH clone URL, run the following command: