Skip to content

Commit

Permalink
Pass -oControlMaster=no
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mrdomino committed Feb 13, 2025
1 parent 38f6000 commit f886a81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f886a81

Please sign in to comment.