@node rlogin
@chapter rlogin
@cindex rlogin

@command{rlogin} command logs into a specified remote host and connects your
local terminal to the remote host.  The remote terminal type is the same as
that given in the @emph{TERM} local environment variable.  The terminal or
window size is also the same, if the remote host supports them, and any
changes in size are transferred.

When using the @command{rlogin} command, you can create a link to your path
using a host name as the link name. For example:

@example
#
# ln -s /usr/bin/rlogin HostName
# Hostname -8

@end example

Using @var{HostName} automatically uses the @command{rlogin} to log in to
the remote host named @var{HostName}.

@command{rlogin} allows access to the remote host without the use of a passwd.
For details, @xref{rcmd, , rcmd, libc, The GNU C Library Reference Manual}.

@section Invoking

The options are as follows :

@table @samp
@item -8
@itemx --8-bit
@opindex -8
@opindex --8-bit
Allows an eight-bit input data path at all times; otherwise parity bits are
stripped except when the remote side's stop and start characters are other
than ^S/^Q .

@item -E
@item --no-escape
@itemx --no-escape
@opindex -E
@opindex --no-escape
Stops any character from being recognized as an escape character.  When used
with the -8 option, this provides a completely transparent connection.

@item -K
@itemx --kerberos
@opindex -K
@opindex --kerberos
Turns off all Kerberos authentication.

@item -d
@itemx --debug
@opindex -d
@opindex --debug
Turns on socket debugging (see setsockopt(2))  on the TCP sockets used for
communication with the remote host.

@item -e
@itemx --escape=CHAR
@opindex -e
@opindex --escape
Allows user specification of the escape character, which is ``~'' by default.
This specification may be as a literal character, or as an octal value in the
form \nnn.

@item -k
@itemx --realm=REALM
@opindex -k
@opindex --realm
The option requests rlogin to obtain tickets for the remote host in REALM
realm instead of the remote host's realm as determined by krb_realmofhost(3).

@item -x
@itemx --encrypt
@opindex -x
@opindex --encrypt
Turns on DES encryption for all data passed via the rlogin session.  This may
impact response time and CPU utilization, but provides increased security.

@end table

A line of the form ``<escape char>.'' disconnects from the remote host.
Similarly, the line ``<escape char>^Z'' will suspend the rlogin session,
and ``<escape char><delayed-suspend char>'' suspends the send portion of
the rlogin, but allows output from the remote system.  By default, the
tilde (``~'') character is the escape character, and normally control-Y
(``^Y'') is the delayed-suspend character.

All echoing takes place at the remote site, so that (except for delays)
the rlogin is transparent.  Flow control via ^S/^Q, if supported, stop
and start the flow of information, flushing of input and output on interrupts
are handled properly.

On the server side the iruserok() and ruserok() functions are used to
authenticate see the appropriate man page for more information, if supported.

@section Kerberos Authentication

If @command{rlogin} was compiled with kerberos support, optins -x, -k, -K
are available.  Each user may have a private authorization list in the file
.klogin in their home directory.  Each line in this file should contain a
Kerberos principal name of the form principal.instance@@realm. If the
originating user is authenticated to one of the principals named in .klogin,
access is granted to the account.  The principal accountname.@@localrealm is
granted access if there is no .klogin file.  Otherwise a login and password
will be prompted for on the remote machine as in login(1).  To avoid
certain security problems, the .klogin file must be owned by the remote user.
If Kerberos authentication fails, a warning message is printed and the
standard Berkeley rlogin is used instead.
