Using the RPC rexec() command.

cotner at .berkeley.edu cotner at .berkeley.edu
Thu Aug 18 11:23:22 AEST 1988


Last time I asked how to use the rpc routines on the SUN.  I got a few
responses, suggesting that I fork and exec
		rsh machine some_command
However, I had wanted to avoid invoking the rsh, and call the rpc routines
directly.  

Can someone please show me how to set up and use the rexec(3N) routines
to execute a command on a remote machine?  I've tried to set up a client
socket, bind to a remote port address, and make the rexec() call, but
I haven't gotten too far.  (It may be that my port address is way off;
I've been using the last digit of the network address entry in the 
/etc/hosts file.  How do you get the proper port number of a remote 
machine?)

Please include an example or code fragment, if you would.

TIA
Carl 
cotner at bosco.Berkeley.EDU



More information about the Comp.unix.questions mailing list