use only 1x ssh to pass "script" and execute it
Brought to you by:
mikehorn
Currently for linux/iptables fwb uses 2x ssh: once to scp (copy) the script file, then ssh to execute it on the remote host.
1x ssh could be saved by giving the script as STDIN to this ssh construct:
ssh ... remote-Host 'cat > path-to-script-on-remote && /bin/sh path-to-script-on-remote ' < path-to-script-local
You could even add some "magic" to "mkdir -p" the basedir.