Using SSH/Shell access
SSH, or secure shell, is a secure network protocol that you can use to sign in to your Acquia Cloud environments and use command-line tools.
Available shell access tasks
After you enable SSH access in Acquia Cloud, you can use SSH/shell access in the Acquia Cloud environment to perform the following tasks:
- Access your file storage directories from the command line
- Import and export databases
- Use the Drush command-line tool
Access your file storage directories from the command line
You have shell access to all of the web nodes running your website, using the same
sitename username and SSH public key credentials that you use for rsync, scp, or SFTP on Acquia Cloud. To access your file storage directories, use the method based on your local operating system:
[site]is your site name,
[env]is the environment name, and
[server]is the name of the server you're signing in to. To view the combined site and server name, see the User and keys page at Cloud > Users and keys. Be sure to specify an environment (usually one of
prod). When you specify an environment, your PATH and other environment variables are set up in exactly the same way as they are for web processes, cron jobs, and Cloud hooks. In particular, whichever version of PHP you have configured on the Cloud > Workflow page will be the first in the PATH, and thus will be the default in your SSH session.
For example, this command accesses the Staging environment of a website named
exampleon the server named
To open a window that allows command-line access to your files, use PuTTY, a free Telnet/SSH client for Windows.
When you run PuTTY, load a session previously configured to connect to your web server, and then click Open.
Import and export databases
Acquia Cloud has unique database requirements that provide the best possible website performance. With SSH access enabled, you can use the Acquia Cloud database import script. For more information, see Importing your database.
Use the Drush command-line tool
Acquia Cloud websites with SSH/shell access have an installed and configured instance of Drush. It enables you to perform many administrative and website maintenance tasks from the command line instead of using the Drupal administrative interface. For more information, see About Drush on Acquia Cloud.
Limitations on shell access
Because of the technical requirements necessary for maintaining a highly available and redundant hosting platform, there are some limits on what you can access and do using shell access on Acquia Cloud:
- Limited file access
You should store files in the persistent network filesystem directory at
- No root access
You do not have root access, even if your website is running on dedicated cloud instances.
- Write access to your Drupal docroot
Use Subversion (SVN) or Git to manage your code on Acquia Cloud. By default, you cannot use shell access to install or update modules or to make other changes to your Drupal docroot directory (
/var/www/html). If you want to make changes to your Drupal docroot directory, enable Live Development. You can use Live Development to modify only your Dev and Stage environments, not your Prod environment. Read more about Editing code on your server.