📄 telnet.txt
字号:
WONT WONT kermit REQUESTED REQUESTED REQUESTED REQUESTED WONT WONT forward-X REFUSED ACCEPTED REFUSED REFUSED WONT WONTThe second line listed for each option shows the currently negotiated stateof the option for the current connection.The SET TELOPT command should be used instead of the older commands: SET TELNET AUTHENTICATION { ACCEPTED, REFUSED, REQUESTED, REQUIRED } SET TELNET BINARY-MODE { ACCEPTED, REFUSED, REQUESTED, REQUIRED } SET TELNET ENCRYPTION { ACCEPTED, REFUSED, REQUESTED, REQUIRED } SET TELNET ENVIRONMENT { ON, OFF } SET TELNET NAWS { ACCEPTED, REFUSED, REQUESTED, REQUIRED } SET TELNET XDISPLAY-LOC { ACCEPTED, REFUSED, REQUESTED, REQUIRED }which are now considered obsolete (but still supported).4. TELNET COMMAND SUMMARYTELNET /AUTH:<type> /ENCRYPT:<type> /USERID:<name> /PASSWORD:<string> <host> <port> The TELNET command is a shortcut for making interactive connections. It is the equivalent of specifying: SET TELOPT AUTH ... SET TELNET AUTH TYPE ... SET TELOPT ENCRYPT ... SET TELNET ENCRYPT TYPE ... SET LOGIN USERID ... SET LOGIN PASSWORD ... SET HOST /CONNECT <host> <port> /TELNET /AUTH:<type> is equivalent to SET TELNET AUTH TYPE <type> and SET TELOPT AUTH REQUIRED with the following exceptions. If the type is AUTO, then SET TELOPT AUTH REQUESTED is executed and if the type is NONE, then SET TELOPT AUTH REFUSED is executed. /ENCRYPT:<type> is equivalent to SET TELNET ENCRYPT TYPE <type> and SET TELOPT ENCRYPT REQUIRED REQUIRED with the following exceptions. If the type is AUTO then SET TELOPT AUTH REQUESTED REQUESTED is executed and if the type is NONE then SET TELOPT ENCRYPT REFUSED REFUSED is executed. /USERID:[<name>] This switch is equivalent to SET LOGIN USERID <name> or SET TELNET ENVIRONMENT USER <name>. If a string is given, it sent to host during Telnet negotiations; if this switch is given but the string is omitted, no user ID is sent to the host. If this switch is not given, your current USERID value, \v(userid), is sent. When a userid is sent to the host it is a request to login as the specified user. /PASSWORD:[<string>] This switch is equivalent to SET LOGIN PASSWORD. If a string is given, it is treated as the password to be used (if required) by any Telnet Authentication protocol (Kerberos Ticket retrieval, Secure Remote Password, or X.509 certificate private key decryption.) If no password switch is specified a prompt is issued to request the password if one is required for the negotiated authentication method.For TCP/IP TELNET connections, which are in NVT (ASCII) mode by default:SET LOGIN USERID <name> If a <name> is given, it sent to host during Telnet negotiations; if this switch is given but the string is omitted, no user ID is sent to the host. If this command is not given, your current USERID value, \v(userid), is sent. When a userid is sent to the host it is a request to login as the specified user.SET LOGIN PASSWORD <password> If a <password> is given, it is treated as the password to be used (if required) by any Telnet Authentication protocol (Kerberos Ticket retrieval, Secure Remote Password (SRP), or X.509 certificate private key decryption.) If no password is specified a prompt is issued to request the password if one is required for the negotiated authentication method.SET TELNET AUTHENTICATION TYPE { AUTOMATIC, KERBEROS_IV, KERBEROS_V, NTLM, SSL, SRP, NONE } [ { ... } ... ] AUTOMATIC allows the host to choose the preferred type of authentication. Other values allow a specific authentication method to be used. AUTOMATIC is the default. Available options can vary depending on configuration; type SET TELNET AUTHENTICATION TYPE ? for a list. When the type is AUTOMATIC and Kermit is accepting incoming connections the supported authentication methods will be offered in the following order: NTLM (windows only) Kerberos 5 Kerberos 4 Secure Remote Password SSL This is the equivalent of the command: SET TELNET AUTH TYPE NTLM KRB5 KRB4 SRP SSLSET TELNET AUTHENTICATION FORWARDING { ON, OFF } Set this to ON to forward Kerberos V ticket-granting-tickets to the host after authentication is complete. OFF by default.SET TELNET AUTHENTICATION ENCRYPT-FLAG { ANY, NONE, TELOPT } Use this command to specify which AUTH telopt encryption flags may be accepted in client mode or offered in server mode. The default is ANY.SET TELNET AUTHENTICATION HOW-FLAG { ANY, ONE-WAY, MUTUAL } Use this command to specify which AUTH telopt how flags may be accepted in client mode or offered in server mode. The default is ANY.SET TELNET BINARY-TRANSFER-MODE { ON, OFF } Set this command to ON if you want to force Kermit to negotiate Telnet Binary in both directions when performing file transfers. Default is OFF. Alias SET TELNET BINARY-XFER-MODE.SET TELNET BUG BINARY-ME-MEANS-U-TOO { ON, OFF } Set this to ON to try to overcome TELNET binary-mode misnegotiations by C-Kermit's TELNET partner.SET TELNET BUG BINARY-U-MEANS-ME-TOO { ON, OFF } Set this to ON to try to overcome TELNET binary-mode misnegotiations by C-Kermit's TELNET partner.SET TELNET BUG INFINITE-LOOP-CHECK { ON, OFF } Set this to ON to prevent Kermit from responding to a telnet negotiation sequence that enters an infinite loop. The default is OFF because this should never occur.SET TELNET BUG SB-IMPLIES-WILL-DO { ON, OFF } Set this to ON to allow Kermit to respond to telnet sub-negotiations if the peer forgets to respond to WILL with DO or to DO with WILL before sending a SB (subnegotiation).SET TELNET DEBUG ON Displays all TELNET negotiations in full detail.SET TELNET DELAY-SB { ON, OFF } When ON, telnet subnegotiation responses are delayed until after all authentication and encryption options are either successfully negotiated or refused. This ensures that private data is protected. When OFF, telnet subnegotiation responses are sent immediately. The default is ON.SET TELNET ECHO { LOCAL, REMOTE } C-Kermit's initial echoing state for TELNET connections, LOCAL by default. After the connection is made, TELNET negotiations determine the echoing.SET TELNET ENCRYPTION TYPE { AUTOMATIC, CAST128_CFB64, CAST128_OFB64, CAST5_40_CFB64, CAST5_40_OFB64, DES_CFB64, DES_OFB64, DES3_CFB64, DES3_OFB64, NONE } AUTOMATIC allows the host to choose the preferred type of encryption. Other values allow a specific encryption method to be specified. AUTOMATIC is the default. The list of options will vary depending on the encryption types selected at compilation time. When the type is AUTOMATIC and Kermit is accepting incoming connections the supported encryption methods will be offered in the following order: DES3_CFB64 CAST128_CFB64 DES_CFB64 CAST5_40_CFB64 DES3_OFB64 CAST128_OFB64 DES_OFB64 CAST5_40_OFB64SET TELNET ENVIRONMENT { variable-name [ value ] } This feature lets Kermit send the values of certain environment variables to the other computer if it asks for them. The variable-name can be any of the "well-known" variables "USER", "JOB", "ACCT", "PRINTER", "SYSTEMTYPE", or "DISPLAY". The default values are taken from your environment; use this command to change or remove them. The most commonly used variables and their default values are: USER: Telnet servers that request this value will use it as the name of the account to be accessed and will therefore not prompt you for a username. If a password is required to access the specified user's account only the password prompt will be issued. The default value is the name of the user on the local machine. This value may also be set with the command SET LOGIN USER <name>. DISPLAY: This variable is used to specify the location of the X Windows Server to be used by X Windows client applications executed on the remote host. This value is used by three telnet options: ENVIRONMENT, XDISPLOC, and FORWARD-X. The default value is retrieved from the value of the DISPLAY environment variable in the local environment. PRINTER: This variable is used to specify the location of the LPR printer to be used for printing files on the host. This variable is not set by default. SYSTEM: This variable is used to specify the operating system type of the local machine. The default value is determined by Kermit. Typical values are "UNIX", "VMS", "WIN32", and "OS2". See RFC1572 for further details.SET TELNET LOCATION [ text ] Location string to send to the Telnet server if it asks. By default this is picked up from the LOCATION environment variable. Give this command with no text to disable this feature.SET TELNET NEWLINE-MODE { NVT, BINARY-MODE } { OFF, ON, RAW } Determines how carriage returns are handled on TELNET connections. There are separate settings for NVT (ASCII) mode and binary mode. ON (default for NVT mode) means CRLF represents CR. OFF means CR followed by NUL represents CR. RAW (default for BINARY mode) means CR stands for itself.SET TELNET PROMPT-FOR-USERID <prompt> Specifies a custom prompt to be used when prompting for a userid. Kermit will prompt for a userid if SET LOGIN USERID {} has been issued prior to a telnet authentication negotiation for an authentication type that requires the transmission of a name. (e.g. Secure Remote Password).SET TELNET REMOTE-ECHO { ON, OFF } Applies only to incoming connections created with: SET HOST * <port> /TELNET This command determines whether Kermit will actually echo characters received from the remote when it has negotiated to do so. The default is ON. Remote echoing may be turned off when it is necessary to read a password with the INPUT command.SET TELNET TERMINAL-TYPE name The terminal type to send to the remote TELNET host. If none is given, your current SET TERMINAL TYPE value is sent, e.g. VT220.SET TELNET TRANSFER-MODE { ON, OFF } When ON (OFF by default) and BINARY negotiations are not REFUSED Kermit will attempt to negotiate BINARY mode in each direction before the start of each file transfer. After the transfer is complete BINARY mode will be restored to the pre-transfer state.SET TELNET WAIT-FOR-NEGOTIATIONS { ON, OFF } Each Telnet option must be fully negotiated either On or Off before the session can continue. This is especially true with options that require subnegotiations such as Authentication, Encryption, and Kermit; for proper support of these options Kermit must wait for the negotiations to complete. Of course, Kermit has no way of knowing whether a reply is delayed or not coming at all, and so will wait forever before continuing the session. If you know that Kermit's Telnet partner will not be sending the required replies, you should instruct Kermit to REFUSE specific options with the SET TELOPT command. If you do not know which command the host is not responding to set this option of OFF.5. DIAGNOSING AND FIXING PROBLEMS CONNECTING TO TELNET SERVERSAfter we replaced the Telnet engine and added support for the newfunctionality we found many Telnet servers that do not adhere to the Telnetprotocol as described in the IETF RFCs. Here are some of the most commonbugs and the workarounds that Kermit provides the user to avoid them.BUG: Telnet Server does not respond to telnet options.Description: The telnet protocol requires that all initial requests for action (WILL or DO) must be responded to either in the affirmative (DO or WILL) or in the negative (DONT or WONT). A negative response is required for all unrecognized options. A failure to respond to a Telnet option may result in the peer waiting forever. This behavior is known to exist in the following telnet servers: AOS/VS II Release 2.20.00.39 IBM OS/2 Warp 4.0 (all versions not configured with authentication modules)Symptom: Kermit connects to the host, waits two minutes, and then reports a telnet protocol error followed by the list of outstanding negotiations. Kermit has sent a Telnet option such as WILL AUTH and is waiting for the required response which never comes. In C-Kermit you will see "Negotiations...." with many dots. In K95 you will see the "spinner" twirl. Example: DNS Lookup... Trying xxx.xxx.xxx.xxx... Reverse DNS Lookup... (OK) Negotiations... ?Telnet Protocol Timeout ?Telnet waiting for response to WILL TERMINAL-TYPE ?Telnet waiting for response to WILL NAWS ?Telnet waiting for response to WILL AUTHENTICATION ?Telnet waiting for response to WILL NEW-ENVIRONMENT **** AOS/VS II Release 2.20.00.39 / Press NEW-LINE to begin logging on **** Too slow - input timed outWorkaround: For each of the telnet options listed as missing a response issue a SET TELOPT <option> REFUSED [REFUSED] command. For instance: SET TELOPT TERMINAL-TYPE REFUSED SET TELOPT NAWS REFUSED SET TELOPT AUTHENTICATION REFUSED SET TELOPT NEW-ENVIRONMENT REFUSEDBUG: Server sends a subnegotiation without negotiating the optionDescription: The telnet protocol requires that subnegotiations not be sent until the peers have agreed to WILL or DO the specified option. All subnegotiations received in a WONT or DONT state are to be ignored.Symptom: There are two possibilities. In the first, the host sends a subnegotiation such as IAC SB TERM_TYPE SEND IAC SE without Kermit attempting to use the telnet option. IAC WILL TERM_TYPE IAC DO TERM_TYPE In this case the subnegotiation request will be ignored and the subnegotiation response IAC SB TERM_TYPE IS <type> IAC SE will not be sent. How this affects the sender of the illegal subnegotation is unknown.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -