diff --git a/scripts/sync.php b/scripts/sync.php index b059cb3..c4258c5 100755 --- a/scripts/sync.php +++ b/scripts/sync.php @@ -264,7 +264,7 @@ function sync_server($id, $only_username = null, $preview = false) { $attempts = array('keys-sync', 'root'); foreach($attempts as $attempt) { try { - $connection = ssh2_connect($hostname, 22); + $connection = ssh2_connect($hostname, $server->port); } catch(ErrorException $e) { echo date('c')." {$hostname}: Failed to connect.\n"; $server->sync_report('sync failure', 'SSH connection failed');