Skip to content

Commit 1437062

Browse files
author
Thomas Pike
committed
Use stored SSH port number for syncing
Resolves: #8
1 parent a26e417 commit 1437062

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/sync.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ function sync_server($id, $only_username = null, $preview = false) {
264264
$attempts = array('keys-sync', 'root');
265265
foreach($attempts as $attempt) {
266266
try {
267-
$connection = ssh2_connect($hostname, 22);
267+
$connection = ssh2_connect($hostname, $server->port);
268268
} catch(ErrorException $e) {
269269
echo date('c')." {$hostname}: Failed to connect.\n";
270270
$server->sync_report('sync failure', 'SSH connection failed');

0 commit comments

Comments
 (0)