Re:File Transfer with SSH, Tee, and Base64
by vlovich123 on Thursday September 17, 2020 @11:35AM
(#24505919)
They mention that you can’t run commands without an interactive shell. I believe that knocks out your proposal because then rsync+ssh would work without all the complexity you have in your post with all the same benefits. Could be wrong though.
Re:File Transfer with SSH, Tee, and Base64
by waterhouse on Thursday September 17, 2020 @12:17PM
(#24506508)
I see, I did miss that.
I do wonder if there's a workaround for that, though. "bash" has the "-l" option for "Make bash act as if it had been invoked as a login shell", and also "-i" forces interactive mode. For ssh, "-t" is "Force pseudo-terminal allocation"; would that work?
Re:File Transfer with SSH, Tee, and Base64
by jwilk on Thursday September 17, 2020 @01:07PM
(#24507165)
I don't follow. How would any of these option help?
Re:File Transfer with SSH, Tee, and Base64
by susam on Thursday September 17, 2020 @12:51PM
(#24506963)
The SSH gateway in between refuses to allocate PTY, so the -t option does not help.
Re:File Transfer with SSH, Tee, and Base64
by crumbshot on Thursday September 17, 2020 @11:54AM
(#24506188)
> Usually this is when one of the machines is accessed via a serial console.
I've found zssh can be quite handy for that, it layers an extra pty over the SSH connection, for file transfer. By default it uses the ZMODEM protocol via rz/sz, but any pair of programs can be plugged in instead - useful if the connection isn't 8-bit clean.
In that scenario, it can help to compress the data before base64-ing it: