0

Drupal 8 site (8.5.3) with drush 8 (8.1.16) both equal on local and remote. Connection to remote is through jump server - log in to jump (ssh -L 2004:remote.com:22 -l username jump.server.com), in other terminal connect to the remote (ssh -l username -p 2004 localhost). All this work fine. I keep these connected, and test drush in third terminal.

Aliases are at drush/aliases.drushrc.php in project dir.

$aliases['site.r'] = [
  'root' => '/home/username/drupal8/web',
  'uri' => 'http://remote.site.com',
  'remote-host' => 'localhost',
  'remote-user' => 'username',
  'ssh-options' => '-p 2004'
];

drush @site.r status -v show me that the aliases are found but result is from local installation.

edit:

sve@eb850 .../panel-d8.local/web (master>) $ drush @kp.r status -v
Loaded alias @kp.r from file                                            [notice]
/var/www/vhosts/panel-d8.local/web/../drush/aliases.drushrc.php
Loading outputformat engine.                                            [notice]
 PHP executable         :  /usr/bin/php                                         
 PHP configuration      :  /etc/php/7.1/cli/php.ini                             
 PHP OS                 :  Linux                                                
 Drush script           :  /var/www/vhosts/panel-d8.local/vendor/drush/drush/dr 
                           ush.php                                              
 Drush version          :  8.1.16                                               
 Drush temp directory   :  /tmp                                                 
 Drush configuration    :                                                       
 Drush alias files      :                                                       

Command dispatch complete                                               [notice]

edit 2: This is a sub-site of multi-site, drush aliases works on local and remote by self in right way.

What is wrong?

  • 1
    Can you maybe add the result? No screenshots please. – leymannx Jan 24 at 15:03
  • added the drush @site.r result (with real names) – svetlio Jan 24 at 15:49
  • Did you try clearing Drush cache? And you should devo upgrade Drush to v9! – leymannx Jan 24 at 16:31
  • it is not suitable at this time to do this kind of changes as this is a part of multi-site and many others will be affected – svetlio Jan 25 at 8:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.