Configuring and Managing MPE/iX Internet Services (MPE/iX 6.5)

80 Chapter6
REMSH Service
Using remsh
MPE/iX Examples
To run remsh from MPE/iX prompt, type:
run remsh.net.sys;info="remotehost -l remoteuser remotecommand"
jhereg(PUB): run remsh.net.sys;info="taltos -l cawti pwd " /u2/home/cawti
END OF PROGRAM
jhereg(PUB):
POSIX Examples
From the POSIX Shell prompt, type:
/SYS/NET/REMSH remotehost -l remoteuser remotecommand
shell/iX> /SYS/NET/REMSH taltos -l cawti pwd
/u2/home/cawti
shell/iX>
There are a number of shell features that can be taken advantage of,
while running under the POSIX shell.
Shell metacharacters that are not quoted are interpreted on the local
host; quoted metacharacters are interpreted on the remote host. Thus
the command line:
/SYS/NET/REMSH taltos -l cawti cat remotefile >> localfile
appends the remote file remotefile to the local file localfile, while
the command line:
/SYS/NET/REMSH taltos -l cawti cat remotefile ">>" otherremotefile
appends remotefile to the remote file otherremotefile.
The following command line runs remsh in the background on the local
system, and the output of the remote command comes to your terminal
asynchronously:
/SYS/NET/REMSH otherhost -l remoteuser -n remotecommand &
The following command line causes remsh to return immediately
without waiting for the remote command to complete:
/SYS/NET/REMSH otherhost -l remoteuser "remotecommand 1>&- 2>&- &"
remsh was written so that if the first parameter in its argument vector
is not remsh, it will use the value as a host name. So you may
symbolically link the host name to the remsh program. A typical BSD
UNIX implementation will have these links under the /usr/hosts
directory.
If you have made a symbolic link to the remsh program that is the host
name, for example you have already entered, (ln -s /SYS/NET/REMSH
taltos in our examples), you could simply generate the same result as
the first example with the following: