0

a valid however sometimes hindering policy at work is that remote server ports are not available in user space.

I only found the following solutions which (probably, as I didn't try them all) won't work.

e.g. when using rsync with -e and ssh -J it results in

channel 0: open failed: administratively prohibited: open failed
stdio forwarding failed
ssh_exchange_identification: Connection closed by remote host
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(235) [Receiver=3.1.2]

so i need a way that will not require a port but only use stdin

1 Answers1

0

for downloading though ssh terminal

ssh -ACq USER@JUMP-HOST 'ssh -ACq USER2@REMOTE-HOST "tar --warning=none -cC ~/DIRECTORY  ./FILES"' | tar -xv
  • connection to jump host and then to remote host
  • the connection is facilitated through keys
  • tar compression does not make sense because the connections are compressed already
  • shell explanation

for uploading

tar -c ./FILES | ssh -ACq USER@JUMP-HOST 'ssh -ACq USER2@REMOTE-HOST "tar -xvC ~/DIRECTORY"'