Setting up SSH multiplexing with ControlPersist[1] can help quite a bit here, since after the first connection you don't have to go through the init/connection phase for subsequent completions.
You can even preemptively fire up a master connection to commonly accessed hosts to avoid the initial delay.
Ah, that’s interesting! I assumed that something like that was going on, as subsequent completions take much shorter (in the same command), but I did not know about preemptively connecting to common hosts.
Thank you very much, I’ll try to play around with it :)
You can even preemptively fire up a master connection to commonly accessed hosts to avoid the initial delay.
[1] https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing