Acquia Cloud creates a Unix user account for each website, called the site user. The website's Drupal/PHP code runs as this user, and all of a website's environments (Dev, Stage, and Prod) use the same Unix user. If there are multiple websites on a single web server, Unix security permissions keep them isolated from each other, because each website runs as a different Unix user.
To use SSH to sign in to your web server as the site user, register SSH public keys for your Acquia user profile. SSH keys provide a more secure way of signing in to a virtual private server with SSH than using a password alone. You can add as many SSH keys as you want, each with its own nickname to help you keep track of them. However, you always sign in to the server as the site user's Unix username. The SSH key nickname is not a Unix username; it is just for your convenience in identifying your SSH keys.
When you SSH in to your Acquia Cloud server, always SSH to the full DNS name of your server and not to your website URL host name. To view your web servers, sign in to the Acquia Cloud UI, select your website, and then go to the Servers page at Cloud > Servers. The following list provides several sample host names:
srv-1.devcloud.hosting.acquia.com(Acquia Cloud Professional)
ded-1.prod.hosting.acquia.com(Acquia Cloud Enterprise, single-tier)
web-1.prod.hosting.acquia.com(Acquia Cloud Enterprise, multitier)
Enabling SSH access to your server
To use SSH to access your server, you must both:
- Have the appropriate permissions. This means you must be a member of a team assigned to the website, and have a role that includes accessing the server with SSH.
- Register an SSH public key in your Acquia profile, as described in Adding a public key.
Note that it may take a few minutes after you add the key until you can use it to access your server.
Some Acquia Cloud websites may also have website-wide SSH public keys. Using per-user SSH public keys is recommended and website-wide SSH public keys can no longer be added to Acquia Cloud websites.
Accessing your server using SSH
After you enable SSH access, you can access your web servers using the method based on your local operating system:
To access your web servers, use a command in this form:
To view the combined website and server name, see the User and keys page at Cloud > Users and keys. You can optionally 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, we recommend that you use PuTTY, a free Telnet/SSH client for Windows.
When you run PuTTY, enter the connection information for the server (or load a session previously configured to connect to your web server), and then click Open.
To install PuTTY on your computer, complete the following steps:
- Download PuTTY to your computer.
- To run the application, double-click the PuTTY icon.
- In Category > Session, in the Host Name (or IP address) field, enter the sitename, environment, and server you are signed in to, in the form of
site.env@server. To view the combined sitename and server name, see the Users and keys page at Cloud > Users and keys. Specify an environment as one of
- In Category > Connection > SSH > Auth, in the Private key file for authentication field, browse for the private SSH key file you saved on your computer.
- In Category > Session, in the Saved Sessions field, enter a name for the server connection, and then click Save.
Use the session you created to connect securely to Acquia Cloud.