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.
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:
- 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.
- 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.
- 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.
- If none of the above methods finds a valid username, “guest” is used.
||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.|