RSH
Updated: January 21, 2005
Syntax
Parameters
Remarks
- Standard operation
The rsh command copies standard input to the remote Command, standard output of the remote Command to its standard output, and the standard error of the remote Command to its standard error. Rsh normally quits when the remote command quits.
- Using Redirection symbols
Enclose redirection symbols in quotation marks for redirection to occur on the remote computer (for example, ">>"). If you do not use quotation marks, redirection occurs on the local computer. For example, the following command appends the remote file RemoteFile to the local file LocalFile:
rsh othercomputer cat remotefile >> localfile
The following command appends the remote file RemoteFile to the remote file OtherRemoteFile:
rsh othercomputer cat remotefile ">>" otherremotefile
-
Using rsh
When using a computer running the Windows Server 2003 family or Windows XP Professional that is logged on to a domain, the primary domain controller for the domain must be available to verify the user name or the rsh command fails.
-
The .rhosts file
The .rhosts file typically permits network access on UNIX systems. The .rhosts file lists computer names and associated logon names that have access to remote computers. When you run rcp, rexec, or rsh commands remotely with a correctly configured .rhosts file, you do not need to provide logon and password information for the remote computer.
The .rhosts file is a text file in which each line is an entry. An entry consists of the local computer name, the local user name, and any comments about the entry. Each entry is separated by a tab or space, and comments begin with a pound sign (#). For example:
host7 #This computer is in room 31A
The .rhosts file must be in the user's home directory on the remote computer. For more information about the specific implementation of the .rhosts file on a remote computer, see the remote system documentation.
- This command is available only if the Internet protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network Connections.
Examples
rsh vax1 -l admin1 telcon
Formatting legend
Format | Meaning |
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Courier font | Code or program output |