Auto configure user files to generate ssh public keys for BitBucket.
ssh to your server.
Download this bash script on your /home/USERNAME/ directory and run the script.
Copy and paste the public keys. Then open a browser and log into Bitbucket.
Choose avatar > Manage Account from the menu bar.
The system displays the Account settings page. Click SSH keys and paste the public keys in there.
OR for GitHub
copy and paste the public keys here: