Cloud Platform

Getting started with SSH

 

For each application, Cloud Platform creates a Unix user account called the site user. An application’s Drupal or PHP code runs as a site user, and all of the application’s environments, including the Development, Staging, and Production environments, use this same account.

To use SSH to sign in as the website user, you must first register SSH public keys for your Acquia user profile, which provides a more secure method of signing in than using a password alone. You can add as many SSH keys as you want, each with their own nicknames to help you track them.

Note

The SSH key nickname is not a Unix username. The nickname serves only to help identify your SSH keys. You must sign in using the website user’s Unix username.

Requirements

To use SSH to access your environment, you must meet the following requirements:

Note
  • After you add an SSH key, it may take Cloud Platform several minutes until you can use the key to access your environments.
  • Acquia supports only RSA user keys.

Using SSH

When you connect to an environment with SSH, your PATH and other environment variables are configured exactly as they are for web processes, cron jobs, and Cloud hooks. In particular, whichever version of PHP you have configured will be the first in the PATH, and therefore will be the default in your SSH browser session.

To use SSH to access your environments, you can either use the ssh command line application, or if you are a Windows user, you can use the PuTTY SSH client.

After you enable SSH access, you can access your application’s web infrastructure using a command in the following form:

ssh [SSH address]

where [SSH address] is your environment’s infrastructure name. To determine your environment’s infrastructure name in the Cloud Platform user interface, view the environment’s SSH URL. You can find the SSH URL for an environment on the environment’s Overview page.

 

SSH and RSA key warnings

If you receive the following warning message when attempting to use your SSH key, it may indicate that your infrastructure has been relaunched:

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

For information about how to handle this warning message, see SSH and RSA key warnings after infrastructure relaunch.

Tasks you can perform from the command line

After you add your SSH key in Cloud Platform, you can use SSH in the Cloud Platform environment to perform the following tasks:

Access your file storage directories from the command line

You have shell access to all web nodes running your application, using the same username and SSH public key credentials you use for rsync, Secure Copy (SCP), or Secure File Transfer Protocol (SFTP) on Cloud Platform. To access your file storage directories, use a command such as:

ssh [SSH address]

For example, this command accesses the Dev environment of an application named example:

Import and export databases

Cloud Platform has unique database requirements to provide the best possible Drupal application performance. With SSH access enabled, you can use the Cloud Platform database import script. For more information, see Importing your database.

Use the Drush command-line tool

Cloud Platform applications with SSH access have an installed and configured infrastructure of Drush for performing administrative and application maintenance tasks from the command line instead of using the Drupal administrative interface. For more information, see About Drush on Cloud Platform.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Acquia Help

Filter by product:

Cloud Platform common questions