

Switch to the terminal session where you are connected to the server via SSH.Copy the SSH URL at the top of the page.On the BitBucket page, click "Repositories" and select the repo you want to clone.If you receive an "access denied" message, read the Troubleshoot SSH Issues help page. If the username is yours, you've successfully setup your SSH key! (Don't worry about the "shell access" statement.

You can use git or hg to connect to Bitbucket. Now you'll see a message like the following: If prompted for your password, enter the one you used when creating the ssh key on your server.The authenticity of host ' (192.30.252.128)' can't be established. Now you might see a warning like the following: The process to do so is actually quite simple. Now that you have your SSH key uploaded, it's a good idea to test it to make sure that it's working before you proceed. Now, you'll see the label of your new Key in the list. ie: Work Computer, Personal Laptop, Live Server etc.) Label: My Git Site Live Server (The title is used to differentiate your computers because you can upload SSH keys from multiple computers.In the top right corner of the BitBucket page, click the "user" icon and select "Manage account".Now that you have it copied, you need to add it to your BitBucket account. When you have it copied, press "q" to quit the less application. Regardless of how you created your key (via the command line or the web interface) you can copy your key by connecting to your server via ssh and typing "less ~/.ssh/id_rsa.pub", then copying everything from "ssh-rsa" to the end of your email address. I'll do this in BitBucket, but if you're working with GitHub, you can follow the steps in the video Adding Your SSH Key to Your GitHub Account to do the same thing there.

Once the key has been created, you'll need to add it to your Git host. If that's the case, you can follow the instructions in the video Generating an SSH Key to Connect with Remote Repositories to create your SSH key. If your server does not have a control panel, you'll need to do it in the command line. If that's the case, the key is usually created through that interface. Many will have a control panel like cPanel or Plesk. This process varies from host to host, so check with your hosting provider for the proper way to create SSH Keys on their platform. In order to clone the repo to your server, you must first setup an SSH key on your server. Now that we have a remote repository setup, the next logical step is to clone the repo to your live server so that you can push the changes that you make locally up to your live site.
