NAME
     con, telnet - talk to a device or a machine across the network

SYNOPSIS
     con path
     con tcp!host!port
     telnet [ -r ] host [port]

DESCRIPTION
     Con joins your keyboard and screen to something else and gets out of the
     way.  Bytes you type go out; bytes that arrive are printed.  Given a path
     it opens that file -- a serial line, say -- and given a dialstring
     tcp!host!port it dials through /net/tcp first.  Nothing is interpreted:
     this is a raw byte shuttle.

     Telnet is the same session with the telnet protocol handled.  It dials
     host on port (23 by default), answers the IAC negotiation servers expect,
     and turns the bare linefeeds of the local keyboard into the CRLF the
     protocol requires.  It announces itself as a vt100 terminal and reports
     the real window size, so a login shell on the far end sets TERM correctly
     and full-screen programs there work without being told anything.

     By default telnet wraps the session in vt(1) so the ANSI art and full-
     screen menus of a BBS render as they were drawn.  -r skips that and
     leaves you in the plain teletype terminal, which suits a line-mode
     service.

     Both need /net/tcp to reach anything by name or number; run attune(1)
     first if the deck is not already connected.  A bare path needs nothing
     but the file.

OPTIONS
     -r   (telnet only.)  Raw teletype mode: do not wrap the session in vt(1).

KEYS
     ctrl-]
          Open the session menu.  It offers:

          s    Send a file by ZMODEM.  You are prompted for a name; a name
               without a leading slash is taken from /n/local/downloads.

          q    Hang up and return to the shell.

          any other key
               Resume the session.

     ctrl-X
          During a transfer, cancel it.  Ctrl-] does the same while a transfer
          is running -- the menu is not offered until the link is idle again.

     Everything else you type is sent to the far end, including ctrl-C.

EXAMPLES
     Dial a board:

          telnet telehack.com

     The dialing book keeps a handful of boards and dials the one you pick:

          boards

     Read a serial device on the deck:

          con /dev/eia0

     Speak to a service by hand, without telnet's protocol handling:

          con tcp!localhost!9777

FILES
     /n/local/downloads
          Where a ZMODEM download lands, and where the send prompt looks for a
          file given by bare name.

     /net/tcp
          The network, borrowed from the crystal or served locally.

SEE ALSO
     attune(1), vt(1), nc(1), ftp(1), bbs(1)

NOTES
     A BBS that starts sending a file announces it, and con notices: the
     download runs by itself and the file is saved under /n/local/downloads.
     Uploads are not automatic -- tell the board you are sending, then press
     ctrl-] and s.

     The escape character is ctrl-], as it is in every telnet client, so there
     is no way to send a literal ctrl-] to the far end.

FRST Computer                                                           CON(1)
