SSH into your environment

Before you can use SSH to connect to an integration environment, you must add your SSH public key to your account.

For security reasons, to add your public key to a production or staging system, you must create a support ticket.

You can then connect using SSH in any of the following ways:

Integration systems

Following are methods to SSH into your integration system.

To SSH to an environment using the magento-cloud command line:

  1. Log in to the project:

    magento-cloud login
    
  2. List the project IDs:

    magento-cloud project:list
    
  3. List the environments in that project:

    magento-cloud environment:list -p <project ID>
    
  4. SSH to the environment:

    magento-cloud ssh -p <project ID> -e <environment ID>
    

To SSH to an environment using the Web Interface:

  1. Log in to the Web Interface.
  2. Hover the mouse pointer over Access Site in the desired environment as the following figure shows.

    Find the SSH URL using the Web Interface

  3. Click the clipboard button to copy the full SSH command to the clipboard. Enter the command in a terminal window.

Staging and production systems

You can’t use the magento-cloud command line to SSH into staging and production systems. To SSH into staging and production systems, first create a support ticket requesting for your public key to be added to the system. The user and URL will have been supplied when the system was provisioned.

With your SSH keys added to those servers, you can use a terminal application, the SSH command, and the URL to access the server.

The URL format follows:

  • Staging: http[s]://staging.<your domain>.c.<project ID>.ent.magento.cloud
  • Production:

    • Load balancer URL: http[s]://<your domain>.c.<project ID>.ent.magento.cloud
    • Direct access to one of the three redundant servers: http[s]://<your domain>.{1|2|3}.<project ID>.ent.magento.cloud

If you don’t know your staging or production URLs, locate the Onboarding Spreadsheet in your Magento Commerce (Cloud) OneDrive account. Tab 3 (DNSSSLCDN) has access information for your staging and production systems. Use the values in the CNAME/Alias (No CDN) cell.