ssh user@domain "printf 'dir' | pax -w " | pax -rUse it instead of scp. Pax standardized [1]1 by IEEE, and scp deprecated by lwn[2] usersg.
[1]1 https://man.bsd.lv/pax.1#STANDARDS [2] https://lwn.net/Articles/835962/
From someone else on "the CLI-way""the CLI-way" ;-)