To be able to connect to my repositories in Bitbucket I did the following steps:
- Executed (Windows 11 Powershell as admin): ssh-keygen -t ed25519 -b 4096 -C "[email protected]". Public and private keys (id_ed25519 and id_ed25519.pub) have been created in C:\Users\myusername\.ssh
- In bitbucket I've added these keys: "My Repository" -> "Repository Settings" -> "SSH Keys"
- I've started the ssh-agent: Start-Service ssh-agent
- I've added the new ssh key to the ssh-agent: ssh-add C:\Users\myusername\.ssh\id_ed25519
- I checked the key with: ssh-add -l. Looks good.
- I tested the connection to bitbucket with: ssh [email protected].
In the final step, I received the following error message: [email protected]: Permission denied (publickey).
Is there anything missing or wrong in the steps above?
That's not the right way doing it, @clex. That's why you're receiving a message saying that your private key will be ignored
You should add only a public key to bitbucket and use a private key on your ssh-agent to authenticate.