Is this port forwarding or something else



I have a tricky problem... at least to me it seems complicated.
I want to run an rsnapshot backup from one remote host to another.
Rsnapshot uses ssh for networking and has allowance for passing
commands to ssh in its conf file.

In order for this to work, a password has to be given at some point.
If ssh-agent is setup and used to avoid a password still a password or
phrase is needed at some time to start the agent and ssh-add your
key.

If both machines are remote how can this be managed from the local
machine?

I mean, I can setup a forwarded port and talk to the second remote as
if from remote1 with something like:

ssh -L 2219:rhost2:22 rhost1
then in rsnapshot config.
ssh -p 2219 [rhost2 will be stipulated in rsnapshot.conf]

And if I've setup authorized_keys all around. There will be no login
prompt, using the ssh-agent on localhost.

But then of course the backup data would come to localhost, and it
needs to go to rhost1

So I'm drawing a blank in man ssh as to syntax to get an rsnaphot
backup run between rhost1 and rhost2 using the ssh-agent on locahost?

All these machinations are coming up because I can't think of a way to
automate rsnaphsot backups between rhost1 and rhost2 without having to
login on rhost1 to either run the command or start the ssh-agent and
add the necessary key with ssh-add so a cron job can access the
socket.

I have user privs on rhost1 and rhost2 but root on localhost.
Things could be automated from localhost since I have the agent setup
when X starts. That is, on locahost the ENV variables can always be
acessed by scripting thru cron, since the agent is running and has had
my key added. The socket is available.

So to get to it, is it possible to tell ssh to setup a three way
tunnel and move data from rhost2 to rhost1 using ssh-agent from
localhost? If so does anyone have a stab examples of the requred
syntax?
.



Relevant Pages

  • Re: Remote backup hosting setup?
    ... >> To just backup the data to a remote server is very easy, ... It comes together with rsync and ssh. ... copy changes within files over to the remote site. ...
    (freebsd-questions)
  • Re: copy partition from a remote server
    ... >> to be able to replace the remote hdd with the backup one if the remote ... or for newer versions, ssh is the default... ...
    (Debian-User)
  • copy partition from a remote server
    ... The remote machine has a hdd with 5GB data. ... It's accessible via ssh over the web. ... I want to make a partition backup from it to a hdd in my office ...
    (Debian-User)
  • Re: Backing Up XP Home SP3 Remotely
    ... even if it is remote. ... But a backup program? ... backup in a domain or a workgroup, ... XCopy cannot read Program Files or Windows. ...
    (microsoft.public.windowsxp.general)
  • FW: Ufsdump to remote tape device
    ... Ufsdump to remote tape device ... but for the last 4 days 1 particular filesystem always fails ... The backup script has about 20 different local mount points that get ... DUMP: Writing 32 Kilobyte records ...
    (SunManagers)

Loading