Suppose I have host A from which I ssh to host B, where I
sudo -U some_role and from under it ssh to host C. My goal is an interactive shell on C.
Assume that from C I cannot ssh back to A.
What is the best way to copy a file from A to C using the connection built above? What preparations / changes should I introduce into the chain to make infrequent, simple file copying possible?
Of course I can run
cat > target_file inside the interactive shell and copy-paste via the terminal, but for large binary files this is not exactly convenient.