Peter, Have a look at `ControlPath`, `ControlPersist` and similar in the ssh man page. With a non-zero Persist, this feature can be used to reuse an initial connection several times, with `sshd` only participating in the initial setup.
This is useful in my own testing infrastructure (in perl, fwiw) which runs our regression suite on many CFarm systems (though we do also construct fairly long chains of shell commands per-ssh, using `set -e` rather than `&&` fwiw). -Paul On Wed, Sep 11, 2024 at 6:22 PM Peter Gutmann via cfarm-users < cfarm-users@lists.tetaneutral.net> wrote: > Peter Gutmann via cfarm-users <cfarm-users@lists.tetaneutral.net> writes: > > >I was hoping to open one SSH connection, run a sequence of commands, then > >disconnect, in order to avoid hammering the servers with repeated SSH > >handshakes. > > Forestalling the inevitable responses :-), I'm aware of the use of '... && > ... > && ... && ...' but that's going to lead to a sort of one-liner-competition > ssh > command to pack everything into a single ssh exec. > > Peter. > _______________________________________________ > cfarm-users mailing list > cfarm-users@lists.tetaneutral.net > https://lists.tetaneutral.net/listinfo/cfarm-users > -- Paul H. Hargrove <phhargr...@lbl.gov> Pronouns: he, him, his Computer Languages & Systems Software (CLaSS) Group Computer Science Department Lawrence Berkeley National Laboratory
_______________________________________________ cfarm-users mailing list cfarm-users@lists.tetaneutral.net https://lists.tetaneutral.net/listinfo/cfarm-users