Closed (works as designed)
Project:
Drush
Version:
All-versions-4.x-dev
Component:
Core Commands
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2011 at 16:35 UTC
Updated:
27 Oct 2011 at 16:46 UTC
There are several possible ways that a site with a 'remote-host' of 'localhost' or '127.0.0.1' could be a connection to a drush remote host.
I'm specifically thinking of the case in which a Vagrant VM is running. Vagrant automatically forwards the SSH port so that you can `ssh localhost -p2222` (for example) and connect to your VM.
This might also be the case if you have an SSH tunnel set up.
It looks like the hostname is checked in several places throughout the codebase, and it would be nice to have some sort of flag (i.e. 'force-remote') in the alias configuration to run commands as remote, even if it is connecting to a port on localhost. I'll mull this over and see what I can come up with.
Comments
Comment #1
Steven Merrill commentedThe workaround below works, so maybe this isn't as big a deal as I had thought. (This is a pretty advanced use case.)
Comment #2
moshe weitzman commentedYeah, known limitation. What I usually do is create a hosts entry for 'tha-vagrant' or similar that points to 127.0.0.1