2

I'm running Drush 10 and have set up site aliases for my local and the remote Drupal site. When I run the following command for my local alias:

drush @local dd

This returns:

var/www/html/abc

But when I run the same command for my remote alias:

drush @remote dd 

This returns:

var/www/html/abc

Connection to "remote" closed

Why is the output different? Is there any chance to avoid the "connection closed" message?

New contributor
MaHe is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • I guess Drush opens a SSH connection to the remote, performs the command, returns you the output of that command and then tells you that it closed the SSH connection again, no? What happens with other commands, like let's say cache:rebuild? Is it the same? – leymannx Jul 30 at 19:48
  • Ah it seems this is coming from an SSH option that Drush adds. Run drush -v @remote dd to get more verbose output and you'll see what SSH command it actually performs. Then see superuser.com/a/457344/219801. But I have no idea how to prevent this at that point. Can you pass SSH options to Drush site aliases? I don't think so. – leymannx Jul 30 at 20:05
  • Wow, just found the --ssh-options. Okay, what happens when you run drush --ssh-options="-o LogLevel=QUIET" @remote dd? Or when you add LogLevel QUIET to your ~/.ssh/config? – leymannx Jul 30 at 20:25

Your Answer

MaHe is a new contributor. Be nice, and check out our Code of Conduct.

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.