======                                              DISview [748]
telnet
======

_________________________________________________________________
telnet <nodename>|<ip_address> [<port_number>] [</filename>]
					       [<@><@scriptname>]
                       Default:  port = 23, no logfile, no script
_________________________________________________________________
The 'telnet' command allows you to initiate a connection using
the Telnet protocol.

The command creates a Telnet session to the specified host.  With
the default port number (23), a connection is made to the Telnet
server at the remote host.

The filename is a file into which to record the telnet session.

The scriptname is a script file to run when the session starts.

If the remote host is running a KA9Q NET Telnet server (i.e. the
host has issued the command 'start telnet'), you will be 
connected to the built-in KA9Q BBS on that host.  

--------
If compiled in, you can access your own built-in KA9Q BBS. Start
your Telnet server (with 'start telnet'), then give a Telnet
command to your own IP address.  (N.B. You must also ensure that
you have an account specified in ~/ftpusers).
--------

Use the <F10> key to escape from a Telnet session back to command
mode, or TAB to cycle round the live sessions.

Use 'close' to close the connection.

If a remote host requests a Telnet session, a message similar to
the following will be displayed on your screen:

    Incoming Telnet session 2 from 158.152.123.251:1026

If you are in command mode, enter ENTER at a "net>" prompt and
you will enter converse mode for the Telnet session.

If you are in converse mode, use the <F10> key to escape back to
command mode, use the 'session' command to list the active
sessions, and then use the 'session <session_number>' command to
enter converse mode on the desired Telnet session.

An ASCII file can be uploaded instead of entering the information
at the keyboard (using the 'upload' command).

Scripts:
	A very crude option, but good enough to automate simple
	sessions.
    *** When a script is used there will be no pause at the end
	of the session. If you want to see the last screen of a 
	scripted telnet session, don't put in the last pair of
	prompt/response lines to end it. 

	If the extra "@" character is included in the parameter,
	a *very* crude test mode is run which logs the received
	character, its value, the number of characters in the 
	current comparison string and, lastly, that string. It
	produces *very* voluminous output and it's not for the
        faint hearted :)

		@scriptname to merely run a script
		@@scriptname to log what happens (provided the 
				/logname option is also present)

	The script takes the form of pairs of strings on separate
        lines; the prompt and the response. For example:

		login:    <- the prompt   - 80 ch max length
		archie    <- the response - 80 ch max length

	In theory, there's no limit to the number of these pairs.

	Note: 	Some servers sprinkle their output with zero
		value characters. These *display* as spaces, but
		the script *ignores* them.
		So, if a log-in prompt displays as " login:",
		that leading "space" may be a space or a null
		character. In the first case the prompt will be
		" login:", but in the second case, "login:".
		Now and then you'll see a prompt like "login:",
		but YAN may see it as " ""login:", ie " login:",
		so beware.
	

>> Examples:  telnet ahost.demon.co.uk
              telnet ahost.demon.co.uk 87                  (chat)
              telnet ahost.demon.co.uk 25 /tel.log  (logged SMTP)
	      telnet archie.doc.ic.ac.uk /archie.log @archie.scr
			            (logged Archie with a script)

The following is a list of so-called "well-known" port numbers:

    0  reserved     42	NAMESERVER	109  POP-2
  1-4  unassigned   43	NICNAME 	110  POP-3
    5  RJE	    53	DOMAIN		111  Sun RPC
    7  ECHO	    67	BOOTPS		113  AUTH
    9  DISCARD	    68	BOOTPC		117  UUCP-PATH
    11	USERS	    69	TFTP		119  NNTP
    13	DAYTIME     75	private dialout 123  NTP
    15	NETSTAT     77	private rje	129  PWDGEN
    17	QUOTE	    79	FINGER		139  NETBIOS-ssn
    19	CHARGEN     87	TTYLINK 	161  SNMP net monitor
    20	FTP-data    93	DCP		162  SNMP traps
    21	FTP-control 95	SUPDUP		512  UNIX comsat
    23	TELNET	   101	HOSTNAME	513  RLOGIN/Unix rwho
    25	SMTP	   102	ISO-TSAP	514  SYSLOG
    37	TIME	   103	X.400 - service 525  TIME daemon
    39	RLP	   104	x.400 - sending 666  Demon's POP3 finger

ANSI:

   ANSI screen formatting used for telnet, but data entry editing
   with the arrow keys does *not* use ANSI codes.
   The arrow keys will move the cursor about the screen and send
   the ANSI code sequences.
