Using drush alias for production environment from staging server
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 firstname.lastname@example.org
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