Using the core.windows_cmd action to perform an scp from windows back to the stackstorm linux host?

(Peter Michael Gits) #1

Was trying to find something within this cmd suite that would allow me to perform an scp back to the stackstorm host?

Thanks in advance,



The scp command (on Linux) works in both directions, so as long as you can SSH into the Windows host, or if you can SCP to the Windows host, you should be able to run core.local on the StackStorm host to scp files from the Windows host to the ST2 host.

Normal scp, from localhost to remote machine:

scp myfile.txt username@remotehost:/path/where/file/should/go/

Reverse scp, from remote machine to localhost:

scp username@remotehost:/path/where/file/should/be/myfile.txt ./

Does that work for you?


To get StackStorm to run the scp command, you should be able to do:

st2 run core.local cmd='scp username@remotehost:/path/where/file/should/be/myfile.txt ./'

(Lindsay Hill) #4

The problem is that Windows systems do not usually have SSHD configured.

I think that what you will need to do here is install an SCP CLI client on the Windows system, then use one of the Windows actions to launch the scp command on that Windows system

(Peter Michael Gits) #5

Yep, that sounds like what the problem is, I thought there might be something internal to the core.windows_cmd that might have something unique. Thank you all for your responses.