---
title: "Using Drush aliases between environments"
date: "2022-02-25T17:39:05+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/94211-using-drush-aliases-between-environments"
id: "62b0d9c2-e6e8-4697-b561-e441884aa50e"
---

Issue
-----

Using Drush alias for production environment from staging server.

Resolution
----------

Your staging and production environments may be on different servers, in which case you cannot use Drush aliases directly from staging for production environment which is on a different server. To be able to do this you can use ssh key forwarding by using the `-A` argument to SSH when connecting from your local computer.

To ssh on to the server use the following command replacing the server name as appropriate:

    ssh -A example.test@staging-1.prod.hosting.acquia.com

You should now be able to use Drush aliases against your production environment from staging server:

    drush @example.prod status

Please note this will only be during the active session. Once the connection is closed you need to SSH again using the `-A` argument.