Menu

#309 use only 1x ssh to pass "script" and execute it

open
nobody
API (9)
5
2012-07-24
2012-07-24
Rado Q
No

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.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB