

Your public key has been saved in /home/hgcheah/.ssh/id_ed25519.pub Your identification has been saved in /home/hgcheah/.ssh/id_ed25519 For the purpose of this tutorial, just focus on the first two lines in the screenshot above (also shown below). Hit enter again and your keys will be generated. You’ll be prompted for it every time you interact with the Bitbucket server via SSH later on. Just set a secure passphrase that you can remember easily. In other words, it’s optional but not really. This helps prevent malicious users from using your private key even if they manage to steal the key from you. The passphrase is like a password for your private key. Next you’ll be asked for an optional passphrase. Since we’re fine with using the default, just hit enter. Once you hit enter, the first step is to tell the wizard where to store the keys and what to name them. Try the 4096-bit RSA instead by using this command. And here’s the command:- $ ssh-keygen -t ed25519Īlternatively, if ED25519 isn’t supported on your system. If you want to feel safer, you can use ED25519 or the 4096-bit version of RSA instead:ĮD25519 – this is the encryption I’m using for this tutorial. While that should be good enough for most cases, this isn’t the most secure encryption. At the time of writing, ssh-keygen uses 2048-bit RSA encryption by default. Running this command will bring up a step-by-step wizard that will help you generate your keys. However, if you don’t, here are the steps to create a new pair of SSH keys (a private key and a public key). If you already have your SSH key pair generated previously, you can reuse them for Bitbucket. I encourage you to follow the link to find out more if you’re interested in giving users project-level access privilege. But unfortunately I’m using a free Bitbucket Cloud account that doesn’t support this feature. The latter is useful when you’re providing SSH access to a collaborator who only requires access to one repository.įor Bitbucket Data Center and Server, it seems like you can also set it up on the project level according to this page. It can be set up to provide account-level access or it can also be configured to provide access by repository. SSH authentication can be set up in two ways on a free Bitbucket account.

How to Set Up Bitbucket SSH Authentication for Git The other being SSH authentication which we’ll cover in this article. One is app token which I will discuss at a different time. With authentication by password removed, there are two other authentication methods you can use. What that means is you can no longer use your Bitbucket account password to authenticate your identity when you try to git clone or perform any other git operations. In 2021, Bitbucket is moving away from password authentication. In this tutorial, I will show you how to set up SSH Git authentication for Bitbucket.
