Today I'd like to give you a little hint how to a execute a remote SSH drush command successfully for a connection defined in aliases.drushrc.php when the SSH port differs from default "22". This is for example the case on Hetzner Hosting.
In my case I set the "remote-port" option, but with no success:
$aliases['live'] = array(
'remote-host' => '...',
'remote-user' => 'my-user',
'remote-port' => 222,
);
?>
I always received the following error when using drush core-rsync:
Finally I found the trick here to set the "ssh-options"-parameter to set the port: https://www.drupal.org/node/820514
$aliases['live'] = array(
'remote-host' => '...',
'remote-user' => 'my-user',
'ssh-options' => '-p 222',
);
?>
That worked great :)
The following issues are related to this:
Please leave a comment if this post was helpful for you.