1

I am trying to use Drush to synchronise a local dev version of my Drupal site and I've set up the following alias file (spc.aliases.drushrc.php) in my .drush directory to allow Drush to connect remotely to the production server:

$aliases['spc'] = array(
'uri' => '[domain url]',
'remote-host' => '[domain url]',
'remote-user' => 'root',
'root' => '[drupal root path]',
'os' => 'Linux',
'path-aliases' => array(
'%drush-script' => '/root/.composer/vendor/bin/drush',
'%files' => '/sites/default/files',
),
);

But when I try to use Drush to connect to this server remotely from my local machine, it just hangs with no error message. The command I'm using is: drush @spc status

If I use -d on this command to show the debug, I can see that Drush is running this command: ssh -o PasswordAuthentication=no root@[site url] "/root/.composer/vendor/bin/drush --debug --uri=[site url] --root=/home/sitename/htdocs --verbose core-status 2>&1" 2>&1

And I can run this ssh command successfully from my local machine, so I can't see why Drush is hanging when it tries to run it.

I'm using Drush 8.0.3 on both the local and remote machines.

Any ideas what might be wrong?

  • Have you checked the auth/secure logs on both machines? SSH hangs for a reason. It's also helpful if you tell the OS of the two machines. – hansfn Mar 25 '16 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.