Open System Services Management and Operations Guide (G06.25+, H06.03+)

Managing With the Shell
Open System Services Management and Operations Guide527191-002
9-10
Executing Remote Shell Commands
If you have the appropriate privileges, pack preserves the access modes, access and
modification dates, and owner of the original file. (For details about these attributes,
see the chmod(1) reference page either online or in the Open System Services Shell
and Utilities Reference Manual.) Otherwise, pack compresses the file and assigns
your owner and group ID to the new file. The compress utility always preserves access
modes, access and modification dates, and owner information.
You can force compression of input files even if the files cannot benefit from
compression. You can also display statistics about the input files.
Compression is not done under certain conditions; for example, the file is already
compressed, has hard links, is a directory, or cannot be opened. For more information
about the pack or compress command, see the pack(1) or compress(1)
reference page either online or in the Open System Services Shell and Utilities
Reference Manual.
Executing Remote Shell Commands
The rsh command executes a specified shell command remotely. It executes
commands at the host system where the commands are to be run. The rsh command
sends standard input from the local host to the remote command and receives
standard output and standard error file data from the remote command.
You can do the following tasks by using the rsh command:
Turn on debugging of the TCP sockets used for communication with the remote
host
Choose to log into the remote host using a specified user name rather than the
local user name
Specify an argument to the command you are performing remotely
The remote host allows access only if at least one of the following conditions is
satisfied:
The local user ID is not the super ID, and the name of the local host is listed as an
equivalent host in the remote /etc/hosts.equiv file.
The remote users home directory contains a $HOME/.rhosts file that lists the
local host and user name.
For security reasons, any $HOME/.rhosts file must be owned by either the remote
user or the super ID, and only the owner should have write access.
For more information about the rsh command, see the rsh(1) reference page either
online or in the Open System Services Shell and Utilities Reference Manual.
Note. If the remote host is a NonStop S-series or NonStop NS-series server, you must specify
the -l flag and provide your password in clear text form. Using clear text for passwords is not
a good practice, so the rsh command should be avoided if possible.