16.4 Network Commands
16.4.3 The rlogin command
Overview
Use the rlogin command to establish a remote login session on another workstation. Remotely logging in to a workstation is helpful under the following circumstances:
  • To access information on another workstation that is not available otherwise.
  • To access your workstation remotely to read mail.
  • To kill a process that has caused your workstation to hang.


Figure lists some functions that can be performed with rlogin. Figure shows how to login to another host under your current user ID.

Specifying a Different Login ID
Use the -l option to specify a different login ID for the remote login session.
The system administrator can set up a guest account so users can remotely log on to a server. Figure shows how to login remotely as another user.

Command Format:
rlogin hostname -l username

Before attempting to remotely login to another system as a different user, be sure you have an account on the desired remote machine. Check with your system administrator if you do not have an account on the remote machine. The information you will need to know is:

  • Machine name
  • Login ID
  • Password of the new account

Terminating a Local Process From a Remote Machine
When your system is not responding and you do not want to reboot, you may be able to kill a process on your system remotely by logging on to another machine and using the
rlogin command to access your system. After successfully killing the process that caused your system to not respond, the exit command will end your rlogin session.  Figure shows an example of terminating a process from a remote machine.

Using rlogin and pkill to Recover From a "Hung" CDE Session
When your workstation does not appear to be responding to mouse or keyboard input, the odds are that the problem stems from within your CDE session as opposed to the underlying operating system itself. In such cases, you can use another workstation to access your workstation via
rlogin (or telnet) and then use the pkill command to terminate the corrupted CDE session; all without rebooting your workstation. Figure shows how to use rlogin and pkill to recover from a hung CDE session. If you know your default shell, use the first example of pkill. If you do not know your default shell, use the second example of pkill, which will determine and terminate all instances of your login shell for you. Either variant will return you to the dtlogin screen, enabling you to start a new CDE session.
Interactive Media Activity (Flash, 95 kB)
  Using rlogin

In this media activity, you are logged in as user2 and your current working directory is /home/user2. Type the commands that would accomplish the following objectives. 
Note: Be sure to press enter after each one. Click on step 1 to begin.