|
|
/usr/hosts/node [ -l user ] [ -n ] [ -s ] [ command ]
If command is omitted, rcmd simply runs rlogin(TC).
By default, the command belongs to the user on the remote node with the same name as the user who ran rcmd. This means that the resulting processes belong to the remote user and begin with the remote user's home directory as their working directory. Options permit you to specify another user on node as the owner. In any case, if the user account requires a password, the remote system must have declared the local user equivalent to the remote user: an entry in /etc/hosts.equiv or in a .rhosts file in the current directory (normally the home directory) of the target user will demonstrate equivalence. (See rcmd(SLIB)).
If an account has no password, any user can use rcmd or rcp commands to access that account. In this case, an entry in /etc/hosts.equiv or in a .rhosts file is not required.
rcmd understands the following options:
If -n is not specified, rcmd reads the local standard input regardless of whether the remote machine reads standard input.
Without -s, rcmd propagates SIGINT, SIGQUIT, SIGTERM, and SIGPIPE with action PASSTHROUGH.
With -s, rcmd propagates signals according to the following table:
signal | action |
---|---|
SIGHUP | SENDTERM |
SIGINT | PASSTHROUGH |
SIGQUIT | PASSTHROUGH |
SIGILL | ABORT |
SIGTRAP | ABORT |
SIGIOT | ABORT |
SIGEMT | ABORT |
SIGFPE | ABORT |
SIGBUS | ABORT |
SIGSEGV | ABORT |
SIGSYS | ABORT |
SIGPIPE | PASSTHROUGH |
SIGALRM | PASSTHROUGH |
SIGTERM | PASSTHROUGH |
SIGUSR1 | PASSTHROUGH |
SIGUSR2 | PASSTHROUGH |
SIGPWR | SENDTERM |
SIGWINCH | PASSTHROUGH |
SIGTSTP | PASSTHROUGH |
SIGCONT | PASSTHROUGH |
SIGTTIN | PASSTHROUGH |
SIGTTOU | PASSTHROUGH |
Should rcmd receive a signal other than one which it has been set to propagate (for example, SIGKILL), it will terminate and the remote process will not be effected.
If the connection to the kshell port succeeds in reaching an authenticated rshd server, rcmd establishes authentication. If rcmd cannot connect to kshell, it aborts the connection and retries using the standard shell port. If that succeeds, the connection is unauthenticated.
If the remote rshd server is in strict mode and authentication fails, one of the following error messages is displayed:
Connection refused
rshd: Authentication is required on host:
hostname
The next example puts the same output on the remote machine.
rcmd central who \> /tmp/c.who
As the above examples illustrate,
metacharacters to be interpreted by the remote shell
must be hidden from the local shell.
Thus
rcmd central cd /etc ; cat passwd
clearly does not do what was intended because the semicolon
is interpreted by the local shell, not the remote shell,
and the remote shell never even sees the cat
command. Either of the following commands properly escapes
the semicolon:
rcmd central cd /etc \; cat passwd
rcmd central 'cd /etc ; cat passwd'
In other installations, this command is called rsh.
Authentication is based on Version 5 of the Kerberos Network Authentication Service protocol. Only this version of the protocol is supported.
Data encryption is not supported.