in reply to executing a program

In addition to the previous monk's suggestions I recommend reviewing the documentation for system . I don't think you want the final print to do what it does.

I also concur with the other monks' wisdom regarding the foolhardy use of 'ssh root@...'