* Joachim Schipper <[EMAIL PROTECTED]> [2007-08-13 12:25]:
> > connection multiplexing can be useful for this sort of thing.
> Yes, it would be, but I never got it to work reliably (Subversion likes
> to close connections before opening the next one, etc). Did you? If so,
> could you share the script/... you used?
not using subversion, but in a script that scps a lot fo files
individually (possibly thousands), I use the following, which even
works with older ssh without connection mux support:
T=`mktemp -u /tmp/.csock-whatever-XXXXXXXXXX`
sshcm="-oControlPath=$T -oControlMaster=auto"
ssh -N -f $sshcm $DST 2>/dev/null
ssh $sshcm -O check $DST 2>/dev/null
if [ $? -ne 0 ]; then # might be older ssh
sshcm="";
fi
for file in ...
scp $sshcm ...
[error handling snipped]
done
ssh $sshcm -O exit $DST 2>/dev/null
--
Henning Brauer, [EMAIL PROTECTED], [EMAIL PROTECTED]
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting - Hamburg & Amsterdam