I just started using shell integration for a remote host. I managed to get it working!
The remote host requires two-factor authentication, so when I log in, I have to provide a token. To do that just once per session, I use controlmaster in .ssh/config. This allows me to log in with ssh once, and after that, ssh and scp do not require password or token.
But, when I try to upload or download a file I have to supply the passphrase for the private key twice, and then a new token once.
Can scp from iTerm2 somehow use the controlmaster option that the ssh/scp command line uses?