Date Published: February 25, 2022
Using Drush aliases between environments
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:
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.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.