From f886a811788f03edc01ea5c818ed74bfd26507dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven=20Dee=20=28J=C5=8Dshin=29?= Date: Wed, 12 Feb 2025 20:22:50 -0800 Subject: [PATCH] Pass -oControlMaster=no Otherwise, some options (I noticed particularly ForwardAgent=no) will get applied across all future sessions on that control socket if the user has configured ControlMaster=auto for that host and we happen to be the session to start the socket. I'm not 100% sure if I picked the right place to put this; maybe it belongs after ForwardAgent=no is appended later. --- scp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scp.c b/scp.c index 0779c3c2b7c4..9589322eb0cd 100644 --- a/scp.c +++ b/scp.c @@ -505,6 +505,7 @@ main(int argc, char **argv) addargs(&args, "-oClearAllForwardings=yes"); addargs(&args, "-oRemoteCommand=none"); addargs(&args, "-oRequestTTY=no"); + addargs(&args, "-oControlMaster=no"); fflag = Tflag = tflag = 0; while ((ch = getopt(argc, argv,