|
Rshd allows remote users to execute a single command on a remote machine via a rsh client, that follows the Remote Shell Daemon UNIX standard. A user password is not required to connect to the daemon. Most commands can be run on the server, including interactive commands and command shells. Some of the commands that can be run are: batch files, command shells, operating system commands, NET commands, and character output applications. Full character mode programs, such as EDIT.COM, cannot be run by the Remote Shell Daemon.
When a rsh client connects to the server, rshd will use the information in the .RHOSTS file to verify the user. See Creating the .RHOSTS File section below for more information about the file. The .RHOSTS file is the only security checking done in the rshd – rsh, interaction. For additional security of password checking, use the Remote Execute Daemon and any rexec client. Logon successes and failures will be recorded in the Windows Application Event Log.
Creating the .RHOSTS file
The .RHOSTS file is a text file of authorized machines and users. Each line of the file should consist of a hostname, or IP address, and username separated by at least one space. The username can be in the format of Domain\Username. Wild cards, using the *, can be used to specify multiple machines or users with a single line.
Example:
|
ClientHost
|
rshUser
|
|
|
Hostname
|
domain\rshUser
|
|
|
*
|
rshUser
|
rshUser can connect from any machine
|
|
host.domain.com
|
*
|
any user can connect from host.domain.com
|
The file should be located in the %SystemRoot%\System32\drivers\etc directory.
In many text editors you cannot create a file beginning with a period(.), so you must first create the file and name it something else (say, RHOSTS), and then from the command line use the rename command to change it to .RHOSTS.
Limitations of RSHD
Since a password is not provided in the rshd - rsh interaction, user context cannot be set to the given user, due to Windows password requirements. After passing the .RHOSTS file check, the command is run under the LocalSystem account. Use a more secure protocol to run a command with user context.
Since rshd runs commands under the LocalSystem account and does not setup user context, any command which requires a logon session, such as the net command, will result in an error message.
The configuration of the Remote Shell Daemon can be set using the Local Server Configuration program, under the InetD -> Remote Shell page. The default settings for the daemon are:
Service Name: Remote Shell
Service Properties:
Service: rshd
Application: Installation Path\InetD\rshd.exe or Installation Path\InetD\rshd64.exe
Arguments:
Network Properties:
TCP/IP Port: 514
Type: console
Protocol: tcp
|