Score:0

rsync over multiplexed SSH connection and multiple jumphosts

id flag

I need to rsync a file from remote hosts to my local machine over multiple jumphosts. I'd like to use shared SSH connections so that I don't have to submit 2FA multiple times at some jumphosts.

The idea is I create a master connection

ssh user@jumphost01

then other connections

ssh -J user@jumphost01,user@jumphost02 root@target01
...

Shared connections control files in ~/.ssh/ look as follows

control:target01:22:root
control:jumphost01:22:user
control:jumphost02:22:user

Now I would expect I can rsync a remote file using

rsync -azv -e 'ssh -o ControlMaster=auto' root@target:/somePath/someFile someFile
or
rsync -azv root@target:/somePath/someFile someFile
or    
rsync -azv -e 'ssh -F /root/.ssh/config' root@target:/somePath/someFile someFile

but I'm getting rsync error

receiving incremental file list
someFile
WARNING: someFile failed verification -- update discarded (will try again).
someFile
ERROR: someFile failed verification -- update discarded.

sent 68 bytes  received 317 bytes  770.00 bytes/sec
total size is 305  speedup is 0.79
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1819) [generator=3.2.3]

Rsync is able to connect to the target but the file transfer is unsuccessful.

rsync versions

local machine - rsync  version 3.2.3  protocol version 31
target machine - rsync  version 3.2.3  protocol version 31

TLDR;

I tested the rsync command without SSH master connection as

rsync -azv -e 'ssh -J user@jumphost01,user@jumphost02' root@target01:someFile .
One-time password (OATH) for `user': 
Password: 
receiving incremental file list
someFile
WARNING: someFile failed verification -- update discarded (will try again).
someFile
ERROR: someFile failed verification -- update discarded.

sent 68 bytes  received 2,767 bytes  195.52 bytes/sec
total size is 18,976  speedup is 6.69
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1819) [generator=3.2.3]

And still getting the same errors.

Score:0
id flag

There were some issues with dynamically linked libraries.

# apt update && apt upgrade

on remote machine solved the issue.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.