From bb43a8f47f4436d424b4b4ba8eda6e7fabc0245f Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Sun, 6 Mar 2016 08:20:16 +0100 Subject: [PATCH] Add ssh multiplexing options to default REMOTE_EXEC and REMOTE_COPY. --- cdist/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cdist/__init__.py b/cdist/__init__.py index 4454a3ac..28464710 100644 --- a/cdist/__init__.py +++ b/cdist/__init__.py @@ -41,8 +41,10 @@ BANNER = """ "P' "" "" """ -REMOTE_COPY = "scp -o User=root -q" -REMOTE_EXEC = "ssh -o User=root -q" +SSH_MUX_OPTS = ("-o ControlPath=~/.ssh/master-%l-%r@%h:%p" + " -o ControlMaster=auto -o ControlPersist=125") +REMOTE_COPY = "scp -o User=root -q " + SSH_MUX_OPTS +REMOTE_EXEC = "ssh -o User=root -q " + SSH_MUX_OPTS class Error(Exception): """Base exception class for this project"""