Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#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