I have a script which runs several commands remotely through ssh. I'm running each command separately because I want to do other things in between executions.
However, I don't want to recreate an ssh session every time I issue a new command. I've read about
-oControlMaster but I can't seem to get it to work.
When I run:
ssh -oControlMaster=yes -oControlPath=/tmp/test.sock root@host
after I enter my password, I just get an ssh session. If I exit out, the
/tmp/test.sock file is no where to be found.
What am I missing?