SSH Keys
Depfloy uses SSH to access your servers, and managing keys is straightforward. The page lives under Settings → SSH Keys (avatar dropdown in the top-right of the Console).
There are two scopes for SSH keys:
- Account level — keys stored against your Depfloy user. New servers get these keys automatically when they are provisioned.
- Server level — keys added to one specific server only. See Server Security for the server-scoped flow.
This page covers the account-level flow.
What is SSH?
SSH (Secure Shell) is a protocol that allows you to access a server through a command-line terminal. SSH keys are used to authenticate your connection to the server over this protocol. Servers added to Depfloy are configured to use SSH, so you need an SSH key if you want to connect directly.
After your key is added to a server, you can SSH in without a password:
ssh depfloy@YOUR_SERVERS_PUBLIC_IP_ADDRESS
If you do not have an SSH key and do not know how to create one, GitHub's documentation on generating an SSH key is a good starting point.
Add an SSH key
For new servers
When you are about to provision your first server, add your public key under Settings → SSH Keys. As part of the provisioning process, Depfloy will add all your active SSH keys to the depfloy user on every new server, so you can sign in without a password.
For existing servers
If a server already exists when you add a new key to your account, the key is not retroactively pushed. Open the server in the Console and add the key from the SSH Keys section there — see Server Security.
Server public key
When you provision a server, Depfloy generates a unique key pair on that server. This key pair is what Depfloy uses to manage the server itself. The public half is automatically added to the authorized_keys file for both the root and depfloy users.
Depfloy public key
Depfloy also generates a per-server key for the depfloy user that is used for Git operations — cloning your project repositories during deployments. The public half is automatically registered with the source control provider you connected (GitHub, Bitbucket).
If you ever see SSH-related access problems on your source control provider's side, check that this key is still listed under your provider's deploy keys for the repository.