Ticket #5823 (closed Bugs: fixed)

Opened 1 year ago

Last modified 7 months ago

Port field in SSH remote server config. doesn't work

Reported by: tededwards Assigned to:
Priority: major Milestone: 2.11
Component: Backup & Restore Version: 2.10-branch
Keywords: SSH port number Cc:
Confirmation: Unreviewed Distro:
Backend Engine: Asterisk 1.8 Distro Ver:
Backend Ver: 1.8.11.1 SVN Revision (if applicable):

Description

Regardless of what port is specified in the SSH remote server configuration screen, it always tries to connect to port 22 of the remote server. This occurs in version 2.10.0.25 and 2.10.0.26 of backup and restore. Did not try earlier versions.

Attachments

port.diff (1.4 kB) - added by mbrevda on 06/13/12 00:43:27.

Change History

(follow-up: ↓ 4 ) 06/13/12 00:40:54 changed by mbrevda

tededwards Please try this patch and report back

06/13/12 00:43:27 changed by mbrevda

  • attachment port.diff added.

06/13/12 08:03:02 changed by mbrevda

reminder: fix #5871 when checking this in (same file)

06/18/12 11:54:05 changed by mbrevda

  • status changed from new to closed.
  • resolution set to fixed.

(In [14150]) fax code cleanup; advanced setting wrtietimeout manager support; add port option to backups; closes #5871; #5823;

(in reply to: ↑ 1 ; follow-up: ↓ 5 ) 07/17/12 20:08:12 changed by tededwards

Replying to mbrevda:

tededwards Please try this patch and report back

mbrevda,

Sorry I didn't see your patch sooner. Still not quite there.

Need to add to /backup/functions.inc/class.backup.php............

case 'ssh': needs port variable added (line 356):

ADD-----> $sport? = backup($sport?);

Also, /backup/bin/backup.php needs port added to SSH login string (line 70).........

backup_log(_('Connecting to remote server...'));

$cmd[] = fpbx_which('ssh'); $cmd[] = '-o StrictHostKeyChecking?=no -i'; $cmd[] = backup($s[$b->bbu_server?]key?);

ADD ------> $cmd[] = '-p'; ADD ------> $cmd[] = backup($s[$b->bbu_server?]port?);

$cmd[] = backup($s[$b->bbu_server?]user?)

. '\@' . backup($s[$b->bbu_server?]host?);

Thanks for your help, - Ted

(in reply to: ↑ 4 ) 07/17/12 20:25:05 changed by tededwards

Replying to tededwards:

Replying to mbrevda:

tededwards Please try this patch and report back

mbrevda, Sorry I didn't see your patch sooner. Still not quite there in 2.10.0.31 Need to add to /backup/functions.inc/class.backup.php............ case 'ssh': needs port variable added (line 356): ADD-----> $sport? = backup($sport?); Also, /backup/bin/backup.php needs port added to SSH login string (line 70)......... backup_log(_('Connecting to remote server...')); $cmd[] = fpbx_which('ssh'); $cmd[] = '-o StrictHostKeyChecking?=no -i'; $cmd[] = backup($s[$b->bbu_server?]key?); ADD ------> $cmd[] = '-p'; ADD ------> $cmd[] = backup($s[$b->bbu_server?]port?); $cmd[] = backup($s[$b->bbu_server?]user?) . '\@' . backup($s[$b->bbu_server?]host?); Thanks for your help and sorry the formatting doesn't look quite right when I submit, - Ted

07/19/12 11:13:16 changed by mbrevda

Thanks. It seems like the case on line 356 already has the port?

07/19/12 11:33:27 changed by mbrevda

07/19/12 11:38:58 changed by mbrevda

(In [14267]) [Module package script: backup 2.10.0.31] re #5823 - add more ssh port support; better handeling of backups > 2gb

07/19/12 11:39:02 changed by mbrevda

(In [14268]) [Module package script: backup 2.10.0.31] re #5823 - add more ssh port support; better handeling of backups > 2gb

10/27/12 08:39:05 changed by sesekongkong