Running Remote Tools from the Command Line

Remote Tools

Running Remote Tools from the Command Line

You can use rsh to execute a single command on the remote host. Use the following syntax:

rsh host [-1 login] [-na] [command]

Information returned by the command is displayed. For example, enter the sequence shown below using the ls command to display the files in your home directory on a UNIX server with the name bigboy.

C:\home>rsh bigboy ls

If the command argument is present, it is executed on the host machine with input and output going to the client PC. If the command argument is absent, a remote login is performed to the host using the terminal emulator program. If the command contains a redirection symbol (>, <, or |), then the symbol must be enclosed in double quotes.

About Authorization

For command execution, the remote user must have an .rhosts file containing the PC’s Internet name and the username for accessing the account. hclnfsd must be running on the remote host. Since the PC does not logically have usernames associated with it, the following algorithm determines the PC username:

  1. If the host argument is specified as the drive letter (for example, K:) of a connected system, the username associated with the drive is used.
  2. If the host is an IP address or name, all network drives are searched for connections to that host. If more than one username is found connected to the host, you will be prompted to choose one.
  3. If none of the connected drives is connected to the host, and you have previously executed an nfs register command, the username and password are validated on the default hclnfsd server. If successful, the registered username is used.
  4. If none of the above methods finds a valid username, “guest” is used.



When rsh is invoked for remote login, the carriage return key will send a <CR> instead of a <LF>.


Normally, rsh provides line-by-line echoed input. The exception is when a remote login is performed. –e will switch to character-by-character non-echoed input.


Does not accept input from the keyboard during a remote shell command.


The argument following the –l specifies the remote username to use. Normally, the local determined username is used as the remote username.

  When a command executes on the remote system, the input device that the command sees is not a terminal but a pipe. Some UNIX commands such as mail and ftp behave differently when executed with input from a pipe rather than a terminal.