Information for: DEVELOPERS   PARTNERS

Adding a public key to an Acquia profile

To connect to Acquia Cloud environments using SSH, you must have an SSH public key added to your Acquia profile. If you have the proper role and permissions as a member of a team, you can also use your public key to SSH to environments of applications to which your team is assigned. You can also use your public key to access your Acquia Cloud environments using SFTP or rsync, or your Git repository.

If you do not already have an SSH key pair, you can create a new public key. Your SSH public key must be at least 4,096 bits in size.

Note

Acquia Cloud does not support Ed25519 SSH keys due to those keys not being FIPS compliant.

To add a public key to your account, complete the following steps:

  1. On your local computer, use one of the following methods to copy your SSH public key file to the clipboard:

    • Using a command: Open a command prompt, and then run one of the following commands (based on your operating system):

      • macOS: pbcopy < ~/.ssh/id_dsa.pub
      • Linux: sudo apt-get install xclip xclip -sel clip < ~/.ssh/id_dsa.pub
      • Windows (with GitBash): clip < ~/.ssh/id_dsa.pub
    • Using a text editor: In a text editor, open your SSH public key file, and then copy the contents of the file to the clipboard. Be sure not to add any extra lines or spaces to the copied key.

      Note

      By default, the file name is either ~/.ssh/id_dsa.pub or ~/.ssh/id_rsa.pub.

  2. Sign in to Acquia Cloud.

  3. Click your user icon in the admin bar, and then click Account Settings.

    Account Settings button

  4. Click the SSH Keys tab.
    Acquia Cloud will display your account’s SSH Keys page.

  5. In the application pane, click Add SSH Keys.

  6. In the SSH Key Name field, enter a descriptive name for the key you’re adding to the account, such as the name of the key’s owner.

  7. In the Public Key field, paste the OpenSSH-formatted key. OpenSSH public keys start with either ssh-dss or ssh-rsa, and appear similar to the following example:

    ssh-dss  AAAAG1bB0us3MAAACBALFF6+dpSkO6bwbJ6BCCwbGavQPqR3JSwGWW== [email protected]
    
  8. Click Add Key.

After you add a key, there can be a delay of approximately one minute before you can use the key to connect to your environments or repository.

Using your public key

With your SSH public key added to your profile, you can use the key to access an Acquia Cloud environment if you meet one of the following requirements:

  • You are a member of a team assigned to the server’s application, and you have a role that includes the appropriate SSH permissions.
  • You are either the Owner or Administrator for the application.

Acquia provides the following permissions related to SSH keys:

  • Add SSH key to Git repository
  • Add SSH key to non-Production environments
  • Add SSH key to the Production environment

If you have only the Add SSH key to git repository and Add SSH key to non-Production environments permissions, you can check code in and out of your application’s Git repository, and use SSH to connect to your application’s Development and Staging environments; however, you can’t connect to your application’s Production environment using SSH.

To learn more about teams and permissions in Acquia Cloud see Managing users, teams, roles, and permissions.

Keys added by team members

If a member of your team adds an SSH key for you, you will receive an email informing you that a key was added to your account. The email will have a subject line similar to the following:

Acquia: An SSH key labeled [labelname] was added to your Acquia account.

Deployment keys and Acquia Cloud

Acquia Cloud does not support the use of deployment keys (machine keys) that are not associated with an individual user account. All SSH keys must be associated with a user account.

Acquia recommends you create a new user account (in addition to the user accounts of your team members) to store the SSH keys that grant your third-party deployment systems (such as Travis or Jenkins) push access to Acquia Cloud. Assign this user account a role that includes the Deploy code, files, or databases to the production environment permission, and then add the SSH public key to the new user account’s profile.

Note

Creating a separate account for your deployment keys protects your subscription from unexpected deployment failures if an employee leaves your organization and is removed from your Acquia Cloud subscription.