Logins into a remote machine through the rlogind daemon on the server to which the RLoginClient is connected. After calling this method, you may interact with the remote login shell through its standard input and output streams. Standard error is sent over the same stream as standard output. You will typically be able to detect the termination of the remote login shell after reaching end of file on its standard output (accessible through {@link #getInputStream getInputStream() }. Disconnecting from the server or closing the process streams before reaching end of file will terminate the remote login shell in most cases.
If user authentication fails, the rlogind daemon will request that a password be entered interactively. You will be able to read the prompt from the output stream of the RLoginClient and write the password to the input stream of the RLoginClient.
@param localUsername The user account on the local machine that istrying to login to the remote host.
@param remoteUsername The account name on the server that isbeing logged in to.
@param terminalType The name of the user's terminal (e.g., "vt100","network", etc.)
@param terminalSpeed The speed of the user's terminal, expressedas a baud rate or bps (e.g., 9600 or 38400)
@exception IOException If the rlogin() attempt fails. The exceptionwill contain a message indicating the nature of the failure.