Using SSH Keys

Using an SSH key is more convenient than typing your dashboard password every time you issue a Git command on a Pantheon site. If you have multiple SSH keys for different purposes and want to tell all of your Pantheon sites to use a specific key, you can configure your local ssh setup to use one key for all Pantheon servers.

In your user account's home directory, there should be an .ssh directory where your keys are stored. There is also a config file. Assuming you have created at least two keys, one named github_rsa and one named pantheon_rsa, the following sample config file will set you up to use one key for Github and another for any Pantheon server:

Host github
    User git
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/github_rsa
Host codeserver.*
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/pantheon_rsa

The github entry can also serve as a shortcut when cloning:

git clone github:account/repo_name.git