Drush working fine locally and now trying to connect remotely.

It finds the server as I'm seeing the ASCII code generated logo of my host as it does also with a "normal" login but it doesn't get me to the part where I have to enter my passphrase.

Does someone have any idea what I am doing wrong here?
Login with ssh.exe in cygwin works as expected.

I have the following alias setup
$aliases['mysite-remote'] = array(
'root' => '/path/to/drupal/site',
'uri' => 'subdomain.mysite.com',
'remote-host' => 'ssh.host.com',
'remote-user' => 'username',
);

$ drush -v -d @mysite-remote
Bootstrap to phase 0. [0.03 sec, 1.77 MB]                            [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.03 sec, 1.92 MB] [bootstrap]
Load alias @mysite-remote [0.04 sec, 1.93 MB]                                                                                                  [notice]

Cache HIT cid: commandfiles-0-9f899b61ed96e4ec5e485dc7abbd51b5 [0.07 sec, 1.94 MB]                                                             [debug]

Undefined offset:  0 command.inc:669 [0.11 sec, 4.16 MB]                                                                                      [notice]

Undefined offset:  0 command.inc:669 [0.12 sec, 4.22 MB]                                                                                      [notice]

Begin redispatch via invoke process [0.12 sec, 4.2 MB]                                                                                        [notice]

Backend invoke: ssh -o PasswordAuthentication=no username@ssh.host.com"drush  --v --d --root=/path/to/drupal/site                [command]

--uri=subdomain.mysite.nl  2>&1" 2>&1 [0.12 sec, 4.21 MB]
executing ssh -o PasswordAuthentication=no username@ssh.host.com "drush  --v --d --root=/path/to/drupal/site --uri=subdomain.mysite.com     [notice]

2>&1" 2>&1 [0.12 sec, 4.21 MB]
Calling system(ssh -o PasswordAuthentication=no username@ssh.host.com"drush  --v --d --root=/path/to/drupal/site --uri=subdomain.mysite.com  2>&1"
2>&1);

Thanks in advance for any help

Comments

damien tournoud’s picture

I doubt this is going to work if you have a passphrase protected key. You probably will have to either: (1) use some kind of SSH agent (I know that Putty has one, maybe there is one in Cygwin) (2) unprotect your key (not really recommended)

undersound3’s picture

Status: Closed (fixed) » Active

Thanks for your reply.

Would this passphrase protected key authentication method not work because of my environment or are there other authentication methods (besides unprotected key authentication) that I'm overlooking that can be used.

To test, I disabled key based authentication and tried to login with default password authentication by specifying this in the ssh-options but unfortuantely no luck.

Calling system(ssh -o PasswordAuthentication=no username@ssh.pcextreme.nl "drush  --v --d --root=/domains/1hoog.nl/htdocs/pm --uri=site.1hoog.nl  2>&1
2>&1);

Is this possible at all or do you always need key based login?

greg.1.anderson’s picture

Status: Active » Fixed

You are looking for the drush ssh command; see #1173644: Use winrs when using "drush ssh" command on Windows. Presently, `drush` with no command defaults to `drush help`, not `drush ssh`.

undersound3’s picture

Thanks for pointing that out, it finds the command now but still hangs where it should ask for the password.
Any ideas what might be causing this behavior?

Output:

$ drush ssh -v -d @mysite-remote
Bootstrap to phase 0. [0.03 sec, 1.77 MB]
Drush bootstrap phase : _drush_bootstrap_drush() [0.04 sec,
Cache HIT cid: commandfiles-0-9f899b61ed96e4ec5e485dc7abbd51
Bootstrap to phase 0. [0.11 sec, 4.16 MB]

Found command: site-ssh (commandfile=ssh) [0.11 sec, 4.16 MB
Load alias @mysite-remote [0.11 sec, 4.18 MB]
ssh -o PasswordAuthentication=yes username@ssh.host.com

Alias:

$aliases['mysite-remote'] = array(
 'root' => '/path/to/drupal/site',
 'uri' => 'subdomain.mysite.com',
 'remote-host' => 'ssh.host.com',
 'remote-user' => 'username',
 'ssh-options' => '-o PasswordAuthentication=yes',
 'path-aliases' => array(
   '%drush' => '~/drush',
 ),
);

Thanks in advance for any help

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Status: Active » Closed (fixed)