In Linux both
scp
and sftp
from OpenSSH support -o
that allows passing SendEnv
to the underlying ssh
.