Connect to a remote environment
You can connect to a remote environment using the magento-cloud
CLI or an SSH command. The magento-cloud
CLI commands can only be used in Starter and Pro integration environments.
Use the Cloud CLI
To log in to a remote integration environment:
-
On your local workstation, change to your project directory.
-
List the environments in that project.
-
Use SSH to log in to the remote environment.
Use an SSH command
The Cloud Console includes a list of Web and SSH access commands for each environment.
To copy the SSH command:
-
Log in to the Cloud Console.
-
Select a project from the All projects list.
-
Select an environment.
-
Click SSH.
-
In the SSH tab, click the copy button to copy the full SSH command to the clipboard.
-
Open a terminal and paste the SSH command to create a connection.
sFTP
Adobe Commerce on cloud infrastructure supports accessing your environments using sFTP (secure FTP) with SSH authentication. Use a client that supports SSH key authentication for sFTP and use your public SSH key. Your public SSH key must be added to the target environment. For Starter environments and Pro integration environments, you can add it through the Cloud Console.
Read-only sFTP connections are not supported; sFTP access is provided with write permission by default.
When configuring sFTP, use the information from your SSH access environment command: <project-id>-<environment-id>--<app-name>@ssh<cloud-host>
- Username: All content before the
@
in your SSH access destination. - Password: You do not need a password for sFTP. sFTP access uses the SSH key authentication.
- Host: All content after the
@
in your SSH access. - Port: 22, which is the default SSH port.
- SSH Private Key: If necessary, provide the location of your private key to the sFTP client. By default, private keys are stored in the
~/.ssh
directory.
Depending on the client, additional options may be required to complete SSH authentication for sFTP. Review the documentation for your selected client.
For Starter environments and Pro integration environments, you may also want to consider adding a mount
for access to a specific directory. You would add the mount to your .magento.app.yaml
file. For a list of writable directories, see Project structure. This mount point only works in those environments.
For Pro Staging and Production environments, if you do not have SSH access to the environment, you must submit an Adobe Commerce Support ticket to request sFTP access and a mount point for access to the specific folder, e.g., pub/media
.
SSH tunneling
You can use SSH tunneling to connect to a service from your local development environment as if the service were local. Before tunneling, configure your SSH.
Use a terminal application to log in and issue commands.
Verify if any tunnels are open using.
To build a tunnel, you must know the application name. You can check application name using the CLI:
Set up the SSH tunnel
For example, to open a tunnel to the sprint5
branch in a project with an app named mymagento
, enter
Sample response:
To display information about your tunnel:
Connect to services
After establishing an SSH tunnel, you can connect to services as if running locally. For example, to connect to the database, use the following command:
Adobe Commerce at Summit
Register for these developer sessions:
- B2B Reimagined: Transforming Go-to-Market Strategies for Profitable Growth (attend online)
- Elevate and Empower Teams with Agentic AI for Exceptional Experiences (attend online)
- How AI Is Transforming the Commerce Landscape (attend online)
- Put the Customer at the Center and Build Relationships That Last a Lifetime (attend online)
- How the Bungie Store Boosted Speed and Scale with Adobe Experience Manager
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more