Putty Generate Ssh Key Bitbucket

Couldn’t get this to work, but now it does, so… time for another “note to self”. 🙂

Add an SSH access key to either a Bitbucket Server project or repository You simply copy the public key, from the system for which you want to allow access, and paste it into Bitbucket Server. Copy the public key. One approach is to display the key on-screen using cat, and copy it from there. Apr 14, 2014 Hi There, I have been following the documentation on setting up ssh access to bitbucket.organd cannot seem to authenticate to the server. I have created the idrsa from openssl v1.0.1e and have copy-pasted idrsa.pub to the key store through account management, However even after adding the key via.

Prerequisites

  • Git, obviously…
  • PuTTY, with puttygen, plink and pageant, to be exact…

Setup

  1. Open puttygen.

  2. Either Load an existing private key, or Generate a new one.

  3. Copy the public key (“Public key for pasting …”) and add it to the git provider settings:

    • https://github.com/settings/keys
    • https://bitbucket.org/account/user/[username]/ssh-keys/
    • https://dev.azure.com/[organization]/_usersSettings/keys
  4. Open pageant.

  5. Load your private key.

  6. Check that the key authentication works with plink:

  7. Set the GIT_SSH environment variable to C:Program FilesPuTTYplink.exe.
    ^^ This is the detail that so many StackOverflow answers and blog/forum posts didn’t mention. Without this, plink worked fine, but git commands still failed with authentication errors.

  8. (optional) Add a shortcut to the private key file to your startup folder. This way pageant will be automatically started, with your key, ready to go, whenever Windows boots up.

Usage

Bitbucket Create Ssh Key

Now, as long as pageant is running with your private key loaded, it should work to clone, pull, push, etc., both to and from, both private and public git repositories. E.g. like this:

git clone [email protected]:example/some-private-repo.git

Note: If you’re asked to accept/store/cache a key, but pressing y doesn’t work, connect using putty first, which should give you a dialog with the same question which does work. Putty will complain/crash because there’s not actually an ssh shell to connect to, but that’s fine. After the key has been saved by putty, git should work fine. E.g. like this:

Sources:makandracards.com, vladmihalcea.com

You can generate an SSH key on Windows using the PuTTY SSH client. You can download PuTTY for free from this URL.

To generate a key with PuTTY, you should:

Bitbucket
  • Download and start the puttygen.exe generator.
  • In the 'Parameters' section choose SSH2 DSA and press Generate.
  • Move your mouse randomly in the small screen in order to generate the key pairs.
  • Enter a key comment, which will identify the key (useful when you use several SSH keys).
  • Type in the passphrase and confirm it. The passphrase is used to protect your key. You will be asked for it when you connect via SSH.
  • Click 'Save private key' to save your private key.
  • Click 'Save public key' to save your public key.

Generate Ssh Key Putty

For more information on how to load the key and connect via SSH using PuTTY, please check this tutorial.

Generate Ssh Key Aix

You find this article useful? Click here to learn more about SiteGround web hosting experts and what else we can do for you!