This is what I have successfully used for SSH in a situation that seems to
fit what you are describing:

  Machine M1 is in the Internet.

  Machine M2 is in the Internet.

  M1 can get into M2 via SSH.

  M2 can access M3 via SSH.

  M3 is not directly accessible from M1.

  M3 is listening for incoming SSH connections at port (say) 713.

  In order to SSH into M3 from M1 we do the following on M1:

  ssh -fngT -L 3022:M3:713 -C M2 ping -i 30 localhost > /dev/null 2>&1

  ssh -p 3022 localhost

  If in M1 we add to .ssh/config the entry

  Host M3
   HostName localhost
   HostKeyAlias M3
   User Username on M3
   Port 3022

then we can get from M1 to M3 by means of

  ssh M3

On Thu, Jun 24, 2021 at 10:59 AM Adam Weremczuk <ad...@matrixscience.com>
wrote:

> Hi all,
>
> I run old rdiff-backup 1.2.8 on a remote server and one local behind an
> ssh bastion.
>
> Direct backup over ssh work fine but I struggle hopping over
> intermediary box. All 3 run Debian.
>
> I've tried ProxyCommand with and without netcat but each time I'm getting:
>
>
> -------------------------------------------------------------------------------------------------------
>
> Fatal Error: Truncated header string (problem probably originated remotely)
>
> Couldn't start up the remote connection by executing
>
>      ssh -C backup rdiff-backup --server
>
> Remember that, under the default settings, rdiff-backup must be
> installed in the PATH on the remote system.  See the man page for more
> information on this.  This message may also be displayed if the remote
> version of rdiff-backup is quite different from the local version (1.2.8).
>
>
> -------------------------------------------------------------------------------------------------------
>
> I haven't been able to find any recipes online and I'm assuming it's
> feasible.
>
> Could anyone help?
>
> Regards,
> Adam
>
>
>

Reply via email to