SSH Key Information

Using the preferred SSH Key connection method is simple. The only thing required is to put your unqiue public key on the server you would like to deploy to. This will authorize Stackahoy to make the secure encrypted deployment.

Generally, you will have a ~/.ssh directory already created on the server, but if it's a brand new installation there is a possibility that it's not there. Creating it is easy:

# Create the .ssh directory if it doesn't exist.
mkdir ~/.ssh
chmod 700 ~/.ssh

# Create the authorized_keys file if it doesn't exist.
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

Please note that this should be created in the home directory of the user that has the rights to the project directory. This must also be the same user you specified to make the deployment in Stackahoy. For a crash course on Linux permissions check this out.

The ~/.ssh/authorized_keys is the file to paste in your Stackahoy key. Once you do that you're done!

# In your favorite IDE, open up the authorized_keys file and 
# paste the public ssh key and save. Done!
vim ~/.ssh/authorized_keys