Without a great deal more context, I can only speculate and offer hints as to how to fix whatever is going on.
Review the command line flags for the
scp command. The command you are asking StackStorm to run is not properly formatted to do what you want to do.
You should be passing the
-i flag to ssh before the private key:
ssh -i /home/admin/.ssh/id_rsa ... ...
that will tell the SSH command to use that private key (aka “identity file”) when connecting to the remote server.
Next verify that StackStorm is running the command as the user you expect. To find the user StackStorm is using to run the action, run the following:
st2 run core.local cmd='whoami'
Furthermore, you should specify what user the SSH client should connect to the remote server as. Do you want to connect as the StackStorm user you just found in the last command? Or do you want to connect as the
admin user? Specify that on the command line:
ssh ... <user>@hldc017.abc.xyz.com:/home/m57684
<user> with the username you wish to use for the remote server.
On top of that, make sure that you are not trying to overwrite the entire home directory of the
m57684 - this could also be the cause of the error. To make sure the SSH client adds the file to the
/home/m57684 directory, append the directory name with a
ssh ... <user>@hldc017.abc.xyz.com:/home/m57684/
/ at the end of the command)
If you follow all of these hints and it still doesn’t work, please post the complete error using Markdown formatting, as well as any more relevant context you can think of. It is impossible to accurately diagnose problems and very difficult to solve them with as little information as you have given so far.