Simple job. Copy Videos folder from G4 over to JackSparrow2 with rsync. Done this a hundred times.
rsync -avP Videos/ tolga@100.xxx.xxx.xxx:/home/tolga/rsync/ protocol version mismatch, is your shell clean? (see the rsync manpage for an explanation) rsync error: protocol incompatibility (code 2) at compat.c(625) [sender=3.4.4] Never seen that one before. Password prompt worked fine, so the connection itself was good. Something after that was the problem.
first thing i found SSH’d in normally to have a look and there it was, plain as day. Every time I log into JackSparrow2 I get a full ASCII banner, box drawing characters, the works. Looks great for a normal login. But rsync uses SSH under the hood too, to spawn a remote process, and it does not want anything on that connection except rsync’s own protocol data. Any stray text before the handshake and it falls over exactly like this. So the banner was my first suspect. Went looking in /etc/motd, that’s the Cockpit and Jellyfin links box, not what was printing. Checked /etc/motd.d/, just a Cockpit symlink, nothing there either. Grepped for the actual banner text and found it in /etc/ssh/banner, being force fed on every single SSH connection through a Banner directive sitting in /etc/ssh/sshd_config.d/99-jacksparrow2.conf. That directive does not care whether the session is interactive or not, it just fires. Commented it out, restarted sshd. Ran the rsync again.
...