I'm trying to run a program on a remote system over ssh using something like:-
where $REMOTE is the IP address of the remote host, and $PROG is the program I want to run.
Unfortunately I can't get $PROG to resolve. The command works if PROG is hard coded.
The program is copied to the remote host successfully using:-
I'm trying to copy a program created by script, and run it on the remote. The copy works but I can't run it unless I hard code the program name. How do I resolve the variable $PROG when I want to run it?
ssh $REMOTE 'sh -x $PROG' where $REMOTE is the IP address of the remote host, and $PROG is the program I want to run.
Unfortunately I can't get $PROG to resolve. The command works if PROG is hard coded.
The program is copied to the remote host successfully using:-
scp -p 22 $PROG root@$REMOTE:/root/$PROG I'm trying to copy a program created by script, and run it on the remote. The copy works but I can't run it unless I hard code the program name. How do I resolve the variable $PROG when I want to run it?