Adding SSH Keys to Windows Azure
azure, bitbucket, continuous-deployment, ssh
Solution
I've never set that up in Azure but some general rules of thumb for handling SSH keys:
- The private key in `$HOME/.ssh/` must have file mode 600 (RW only for the owner)
- You need both, the public and the private key in this folder, usually named `id_rsa` and `id_rsa.pub` but you can change the filename to whatever you like
- You have to convert the private key generated by puttykeygen to a OpenSSH2 compatible format, see How to convert SSH keypairs generated using PuttyGen
- `known_hosts` stores the public keys of the servers you've already connected to. That's useful to make sure that you are really connecting to the same server again. more detailed information on this topic
HTH
Problem
I'm trying to setup continuous deployment for an Azure website using bitbucket. The problem is I'm using a submodule (which I own) that Azure doesn't have permission to, because it doesn't add that by default. I'm trying to figure out how to add an SSH key so that Azure can connect and get the submodule. Steps I've taken. Created a New Public/Private Key with PuttyGen, Added the public key to my bitbucket account under the name Azure FTPed into Azure, and added both the public and private key files (.ppk) to the .ssh directory (yeah I didn't know which one I was suppose to add). They are named azurePrivateKey.ppk, and azurePublicKey. Updated my config file to look like this ``` HOST * StrictHostKeyChecking no Host bitbucket.org HostName bitbucket.org PreferredAuthentications publickey IdentityFile ~/.ssh/azurePrivateKey.ppk ``` (no clue if that's right) Updated my Known Hosts to look like this ``` bitbucket.org,131.103.20.168, <!--some key here...it was here when i opened the file, assuming it's the public key for the repo i tried to add--> bitbucket.org,131.103.20.168, <!--the new public key i tried to add--> ``` And I still get the same error, no permission to get submodule. So i'm having trouble figuring out which step I did incorrectly as I've never done this before.