I am trying to automate a process of copying files from a CD over a network from a host to a remote terminal.
Due to the security setup we have I need to SSH as root.
However the commands to run a script need the environment of a different user in order to run correctly.
I have tried the following but this just wants to run the command locally before carrying out the SSH.
my code:-
ssh workstationA "su -c <./MY_SCRIPT> bob"
Any ideas?
Thanks scfc1976
Due to the security setup we have I need to SSH as root.
However the commands to run a script need the environment of a different user in order to run correctly.
I have tried the following but this just wants to run the command locally before carrying out the SSH.
my code:-
ssh workstationA "su -c <./MY_SCRIPT> bob"
Any ideas?
Thanks scfc1976