I am not sure I understand the question. I cannot tell if you want the output of the script to be redirected to a file on the remote host, or if you want the output of the script to be echoed as commands to be executed. Both are possible, but I assume you mean the former.
In this case, it is really a simple matter of using a pipe to redirect to ssh, followed by shell redirection on the remote machine. For example,
Code:
echo "$(/usr/bin/w)
$(/usr/bin/free)" | ssh root@192.168.0.1 "sh -c 'cat > /where/your/want/to/put/the/output'"
P.S.
As suggested above, ssh to root is a bad idea all around.