|
From: Holger P. <wb...@pa...> - 2007-01-25 12:23:00
|
Hi,
Torsten Sadowski wrote on 25.01.2007 at 11:46:32 [Re: [BackupPC-users] Change port for backup over SSH]:
> Am Donnerstag, 25. Januar 2007 11:42 schrieb Nick:
> > I am backing up a large number of hosts using RSync over SSH. A number of
> > these hosts are running on non standard ssh ports.
> >
> > Is there a way I can specify the port to use for each individual host?
> > [...]
>
> man ssh says:
>
> [-p port] as an option.
meaning you want to change $Conf {RsyncClientCmd} (and
$Conf {RsyncClientRestoreCmd}) on a per-host basis to include the -p option,
something like
$Conf {RsyncClientCmd} = '$sshPath -p 2222 -q -x -l root $host $rsyncPath $argList+';
Alternatively, you can leave the BackupPC configuration as it is and set up
~backuppc/.ssh/config something like:
Host my.first.computer
Port 2222
Host my.second.computer
Port 3333
See ssh_config(5) for details. The hostnames you use will probably have to
match exactly what is passed as $host to ssh, i.e. leave out or add the
domain part as appropriate.
You can even do both of the above, but it's a bit pointless :). The command
line arguments would in this case override the defaults in .ssh/config if
they don't match.
Regards,
Holger
|