SSH Keys

SSH keys are a way to identify trusted computers, without involving passwords. In order to connect to a server over SSH, you need to generate a generate a public and private key pair. The two most common types are rsa and dsa. It's a good idea to go ahead and generate both as some servers may require one or the other.

Your SSH keys can be found on your local machine in the .ssh directory. For Mac/Linux systems, this directory is located at /Users/username/.ssh. For Windows users, it can be found at C:/Users/username/.ssh or C:/Documents and Settings/username/.ssh (depending on how GitBash is installed).

If you're on a new system, the .ssh folder may be empty. If not, you might notice the following files:

id_rsa // private rsa key
id_rsa.pub // public rsa key
id_dsa // private dsa key
id_dsa.pub // public dsa key

If you don't see these files, you should go ahead and generate a new set of keys using the ssh-keygen command. For Mac/Linux users, the ssh-keygen command is installed by default. For Windows users, you should install GitBash which comes with Git tools for Windows.

Command Description
ssh-keygen generate a full set of keys
ssh-keygen -t rsa generate a new rsa key set (id_rsa and id_rsa.pub)
ssh-keygen -t dsa generate a new dsa key set (id_dsa and id_dsa.pub)

Windows users should refer to this guide for more comprehensive instructions on setting up SSH keys.

Once your key pair is generated, you'll need to add it to the target server as well. This is a simple process:

To establish a connection to a live site (SiteGround or cPanel-based) you can add your id_dsa.pub file in the SSH section within cPanel.

cPanel SSH Key Upload

For the infodev server, please send your id_dsa.pub file (zipped)and ask a server admin to add your key to authorized_keys so that a connection may be established.