Thanks for the idea!....I thought of using the client-server idea much before using rexec....but just for dumping few logging messages in a file on machineB(which is already overloaded with too many processes), I didnt want to go ahead with this idea.
But, in the rexec, i felt that the password-change of machine B's login will result in the modification of my source code(i can still avoid modifying the source code, by dynamically changing the passwd). And also, it was consuming more msecs for executing this system call.
Regards
Deepa