Score:0

I want to connect to my repo via SSH on a remote server, do I need to store my private keys on the server as well?

cl flag

I'm following these steps to be able to connect to my BitBucket account/repo on a remote server.

I'm a bit confused. I already have a separate pair of keys for BitBucket (i.e. to do stuff on my local machine). So, I need to generate a new pair of keys for every remote server we have as well?

I'm also not clear about the "Create an SSH key pair" and "Add your key to the SSH agent" steps -- I'm supposed to generate the SSH keys while I'm on the server and then basically leave the private key on the server as well (since I want to be able to perform git commands)?

Score:1
bh flag

You don't need a new keypair for each server, it's up to you if you want to do that, but it's ok to reuse the same keypair for multiple services.

I'm supposed to generate the SSH keys while I'm on the server and then basically leave the private key on the server as well

Absolutely not. You're supposed to generate your keypair locally (i.e. on your own machine), and adding your private key to your SSH agent is an optional step, it's just to make your life a bit more convinient by not asking each time for the password to decrypt your private key. Every time you use an SSH keypair to authenticate to some server (and public key cryptography in general), the server only needs your public key. Your private key is supposed to stay pivate, i.e. kept in a safe place and never shared with anyone. If someone gets your private key, she's able to authenticate as you to the server. Follow the steps in Provide Bitbucket Cloud with your public key to give Bitbucket your public key and keep your private key encrypted (i.e. password protected) on your machine.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.