diff --git a/Deployer/Rsync.php b/Deployer/Rsync.php index 11df8ea..b1e93fa 100644 --- a/Deployer/Rsync.php +++ b/Deployer/Rsync.php @@ -146,8 +146,12 @@ protected function buildCommand(array $connection, array $rules, $real = false) $options = array(); $options[] = $this->config['options']; - if (!empty($connection['port'])) { - $options[] = '-p '.$connection['port']; + if (!empty($connection['rsync_port'])) { + $options[] = '-p '.$connection['rsync_port']; + } + + if ($connection['ssh_port'] != 22) { + $options[] = sprintf('--rsh="ssh -p%d"', $connection['ssh_port']); } if ($this->config['delete']) {