TELNET(1)
okay bestie, welcome to TELNET(1) β literally the user interface to the TELNET protocol, and she is serving maximum main-character energy. π
π NAME π
telnet β user interface to the TELNET protocol β¨
π¦ SYNOPSIS π¦
telnet [-8] [-E] [-F] [-K] [-L] [-S tos] [-X authtype] [-a] [-c] [-d]
[-e escapechar] [-f] [-k realm] [-l user] [-n tracefile] [-r] [-x] [host
[port]]
πΈ DESCRIPTION πΈ
The telnet command is used to communicate with another host using the TELNET protocol. If telnet is invoked without the host argument, it enters command mode, indicated by its prompt (telnet>). In this mode, it accepts and executes the commands listed below. If it is invoked with arguments, it performs an open command with those arguments. π«Ά
β¨ OPTIONS β¨
-8β Specify an 8-bit data path. This causes an attempt to negotiate the TELNET BINARY option on both input and output. π-Eβ Stop any character from being recognized as an escape character. π«-Fβ forward a forwardable copy of the local credentials to the remote system. πͺͺ-Kβ Specify no automatic login to the remote system. π ββοΈ-Lβ Specify an 8-bit data path on output. This causes the BINARY option to be negotiated on output. π-S tosβ Set the IP type-of-service (TOS) option for the telnet connection to the value tos, which can be a numeric TOS value (in decimal, or a hex value preceded by0x, or an octal value preceded by a leading0) or, on systems that support it, a symbolic TOS name found in the/etc/iptosfile. π₯-X atypeβ Disable the atype type of authentication. π-aβ Attempt automatic login. This sends the user name via theUSERvariable of the ENVIRON option, if supported by the remote system. The name used is that of the current user as returned bygetlogin(2)if it agrees with the current user ID; otherwise it is the name associated with the user ID. π«Ά-cβ Disable the reading of the user's.telnetrcfile. (See thetoggle skiprccommand on this man page.) π-dβ Set the initial value of the debug flag toTRUE. π-e escape charβ Set the initial telnet escape character to escape char. If escape char is omitted, then there will be no escape character. π-fβ forward a copy of the local credentials to the remote system. πͺͺ-k realmβ If Kerberos authentication is being used, request that telnet obtain tickets for the remote host in realm realm instead of the remote host's realm, as determined bykrb_realmofhost(3). π-l userβ If the remote system understands the ENVIRON option, then user will be sent to the remote system as the value for the variableUSER. This option implies the-aoption. This option may also be used with theopencommand. π€-n tracefileβ Open tracefile for recording trace information. See theset tracefilecommand below. π§Ύ-rβ Specify a user interface similar torlogin(1). In this mode, the escape character is set to the tilde (~) character, unless modified by the-eoption. π-xβ Turn on encryption of the data stream. When this option is turned on,telnetwill exit with an error if authentication cannot be negotiated or if encryption cannot be turned on. πhostβ Indicates the name, alias, or Internet address of the remote host. πportβ Indicates a port number (address of an application). If the port is not specified, the default telnet port (23) is used. π
When in rlogin mode, ~ is the telnet escape character; a line of the form ~. disconnects from the remote host. Similarly, the line ~^Z suspends the telnet session. The line ~^] escapes to the normal telnet escape prompt. π«
Once a connection has been opened, telnet will attempt to enable the TELNET LINEMODE option. If this fails, then telnet will revert to one of two input modes: either "character at a time" or "old line by line," depending on what the remote system supports. π¦
When LINEMODE is enabled, character processing is done on the local system, under the control of the remote system. When input editing or character echoing is to be disabled, the remote system will relay that information. The remote system will also relay changes to any special characters that happen on the remote system, so that they can take effect on the local system. β¨
In "character at a time" mode, most text typed is immediately sent to the remote host for processing. β‘
In "old line by line" mode, all text is echoed locally, and (normally) only completed lines are sent to the remote host. The "local echo character" (initially ^E) may be used to turn off and on the local echo. (This would mostly be used to enter passwords without the password being echoed.) π
If the LINEMODE option is enabled, or if the localchars flag is TRUE (the default for "old line by line"; see below), the user's quit, intr, and flush characters are trapped locally, and sent as TELNET protocol sequences to the remote side. If LINEMODE has ever been enabled, then the user's susp and eof are also sent as TELNET protocol sequences, and quit is sent as a TELNET ABORT instead of BREAK. There are options (see toggle autoflush and toggle autosynch below) which cause this action to flush subsequent output to the terminal (until the remote host acknowledges the TELNET sequence) and flush previous terminal input (in the case of quit and intr). π₯
While connected to a remote host, telnet command mode may be entered by typing the telnet "escape character" (initially ^]). When in command mode, the normal terminal editing conventions are available. π
The following telnet commands are available. Only enough of each command to uniquely identify it need be typed (this is also true for arguments to the mode, set, toggle, unset, slc, environ, and display commands). π
auth argument ...
The auth command manipulates the information sent through the TELNET AUTHENTICATE option. Valid arguments for the auth command are as follows:
disable typeβ Disables the specified type of authentication. To obtain a list of available types, use theauth disable ?command. π«enable typeβ Enables the specified type of authentication. To obtain a list of available types, use theauth enable ?command. βstatusβ Lists the current status of the various types of authentication. π
close
Close a TELNET session and return to command mode. π
display argument ...
Displays some or all of the set and toggle values (see below). π
encrypt argument ...
The encrypt command manipulates the information sent through the TELNET ENCRYPT option. π
π¨ Note: Because of export controls, the TELNET ENCRYPT option is not supported outside of the United States and Canada.
Valid arguments for the encrypt command are as follows:
disable type [input|output]β Disables the specified type of encryption. If you omit the input and output, both input and output are disabled. To obtain a list of available types, use theencrypt disable ?command. π«enable type]fP [input|output]β Enables the specified type of encryption. If you omit input and output, both input and output are enabled. To obtain a list of available types, use theencrypt enable ?command. βinputβ This is the same as theencrypt start inputcommand. β¬ οΈ-inputβ This is the same as theencrypt stop inputcommand. βΉοΈoutputβ This is the same as theencrypt start outputcommand. β‘οΈ-outputβ This is the same as theencrypt stop outputcommand. βΉοΈstart [input|output]β Attempts to start encryption. If you omit input and output, both input and output are enabled. To obtain a list of available types, use theencrypt enable ?command. βΆοΈstatusβ Lists the current status of encryption. πstop [input|output]β Stops encryption. If you omit input and output, encryption is on both input and output. βΈοΈtype typeβ Sets the default type of encryption to be used with laterencrypt startorencrypt stopcommands. π·οΈ
environ arguments ...
The environ command is used to manipulate the variables that may be sent through the TELNET ENVIRON option. The initial set of variables is taken from the user's environment, with only the DISPLAY and PRINTER variables being exported by default. The USER variable is also exported if the -a or -l options are used. π±
Valid arguments for the environ command are:
define variable valueβ Define the variable variable to have a value of value. Any variables defined by this command are automatically exported. The value may be enclosed in single or double quotes so that tabs and spaces may be included. βοΈundefine variableβ Remove variable from the list of environment variables. ποΈexport variableβ Mark the variable variable to be exported to the remote side. π€unexport variableβ Mark the variable variable to not be exported unless explicitly asked for by the remote side. π₯listβ List the current set of environment variables. Those marked with a*will be sent automatically; other variables will only be sent if explicitly requested. π?β Prints out help information for theenvironcommand. β
logout
Sends the TELNET LOGOUT option to the remote side. This command is similar to a close command; however, if the remote side does not support the LOGOUT option, nothing happens. If, however, the remote side does support the LOGOUT option, this command should cause the remote side to close the TELNET connection. If the remote side also supports the concept of suspending a user's session for later reattachment, the logout argument indicates that you should terminate the session immediately. πͺ
mode type
Type is one of several options, depending on the state of the TELNET session. The remote host is asked for permission to go into the requested mode. If the remote host is capable of entering that mode, the requested mode will be entered. ποΈ
character
Disable the TELNET LINEMODE option, or, if the remote side does not understand the LINEMODE option, then enter "character at a time" mode. π
lineβ turns on the TELNET LINEMODE option, or, if the remote side is being a hater and doesn't understand LINEMODE, it tries to slide into ``old-line-by-line'' mode instead πisig (-isig)β tries to enable (or disable) the TRAPSIG mode of the LINEMODE option. Heads up bestie: this needs LINEMODE to be enabled first, no cap.edit (-edit)β tries to enable (disable) the EDIT mode of the LINEMODE option. Also requires LINEMODE to be enabled. gatekept by LINEMODE fr.softtabs (-softtabs)β tries to enable (disable) the SOFT_TAB mode of the LINEMODE option. Yep, you guessed it: LINEMODE must be enabled.litecho (-litecho)β tries to enable (disable) the LIT_ECHO mode of the LINEMODE option. LINEMODE has to be on for this too π?β prints out help information for themodecommand. your little cheat sheet β¨open host [-a] [[-l] user] [-port]β opens a connection to the named host. If you don't specify a port number,telnetwill attempt to contact a TELNET server at the default port. The host spec can totally be either a host name (seehosts(5)) or an Internet address written in ``dot notation'' (seeinet(3)).
Okay so once the connection is established, the file .telnetrc in the user's home directory gets opened π Lines that begin with a # are comment lines. Blank lines? Ignored, we don't see them. Lines that begin without white space are the start of a machine entry, and the first thing on that line is the name of the machine being connected to. The rest of the line, plus successive lines that begin with white space, are assumed to be telnet commands and get processed as if they'd been typed in manually at the telnet command prompt. it's giving automation slay π
-aβ attempts automatic login. This sends the user name via the USER variable of the ENVIRON option, if the remote system supports it. The name used is the one fromgetlogin(2)if it agrees with the current user ID; otherwise it's the name associated with the user ID. iykyk π«Ά[-l] userβ may be used to specify the user name to be passed to the remote system via the ENVIRON option.-portβ when you're connecting to a non-standard port,telnetomits any automatic initiation of TELNET options. But when the port number is preceded by a minus sign, the initial option negotiation is done. tiny detail, huge difference β
quitβ closes any open TELNET session and exitstelnet. An end of file (in command mode) will also close a session and exit. sayonara π¦send argumentsβ sends one or more special character sequences to the remote host. These are the arguments you can specify (and yes, you can specify more than one at a time π):abortβ sends the TELNET ABORT (Abort processes) sequence.aoβ sends the TELNET AO (Abort Output) sequence, which should cause the remote system to flush all output from the remote system to the user's terminal. bye bye scrollback πaytβ sends the TELNET AYT (Are You There) sequence, to which the remote system may or may not choose to respond. no cap, it might just ignore you πbrkβ sends the TELNET BRK (Break) sequence, which may have significance to the remote system.ecβ sends the TELNET EC (Erase Character) sequence, which should cause the remote system to erase the last character entered.elβ sends the TELNET EL (Erase Line) sequence, which should cause the remote system to erase the line currently being entered. wiping the whole line, iconic β¨eofβ sends the TELNET EOF (End Of File) sequence.eorβ sends the TELNET EOR (End of Record) sequence.escapeβ sends the current telnet escape character (initially ``^'').gaβ sends the TELNET GA (Go Ahead) sequence, which likely has no significance to the remote system. lowkey just vibes π«getstatusβ if the remote side supports the TELNET STATUS command,getstatuswill send the subnegotiation to request that the server send its current option status. gossip session, but make it protocol πipβ sends the TELNET IP (Interrupt Process) sequence, which should cause the remote system to abort the currently running process.nopβ sends the TELNET NOP (No OPeration) sequence. doing absolutely nothing, but professionally πsuspβ sends the TELNET SUSP (SUSPend process) sequence.synchβ sends the TELNET SYNCH sequence. This sequence causes the remote system to discard all previously typed (but not yet read) input. It's sent as TCP urgent data β and it may not work if the remote system is a 4.2BSD system; if it doesn't work, a lower case ``r'' may be echoed on the terminal. so if you see a randomr, that's why, don't panic πdo cmddont cmdwill cmdwont cmdβ sends the TELNET DO cmd sequence.cmdcan be either a decimal number between0and255, or a symbolic name for a specific TELNET command.cmdcan also be eitherhelpor?to print out help information, including a list of known symbolic names. so many options, so little time π?β prints out help information for thesendcommand.
set argument valueunset argument valueβ thesetcommand will set any one of a number of telnet variables to a specific value or to TRUE. The special valueoffturns off the function associated with the variable, which is equivalent to using theunsetcommand. Theunsetcommand will disable or set to FALSE any of the specified functions. The values of variables may be interrogated with thedisplaycommand π
The variables that may be set or unset, but not toggled, are listed right here. Bonus: any of the variables for the toggle command may also be explicitly set or unset using the set and unset commands.
aytβ iftelnetis inlocalcharsmode, or LINEMODE is enabled, and the status character is typed, a TELNET AYT sequence (seesend aytpreceding) is sent to the remote host. The initial value for the "Are You There" character is the terminal's status character.echoβ this is the value (initially^E'') which, when inline by line'' mode, toggles between doing local echoing of entered characters (for normal processing) and suppressing echoing of entered characters (for entering, say, a password). secret secret π€«eofβ iftelnetis operating in LINEMODE or ``old line by line'' mode, entering this character as the first character on a line will cause this character to be sent to the remote system. The initial value of theeofcharacter is taken to be the terminal'seofcharacter.eraseβ iftelnetis inlocalcharsmode (seetoggle localcharsbelow), and iftelnetis operating in ``character at a time'' mode, then when this character is typed, a TELNET EC sequence (seesend ecabove) is sent to the remote system. The initial value for theerasecharacter is taken to be the terminal'serasecharacter.escapeβ this is the telnet escape character (initially ``^['') which causes entry into telnet command mode (when connected to a remote system). your little trapdoor πͺβ¨flushoutputβ iftelnetis inlocalcharsmode (seetoggle localcharsbelow) and theflushoutputcharacter is typed, a TELNET AO sequence (seesend aoabove) is sent to the remote host. The initial value for the flush character is taken to be the terminal'sflushcharacter.forw1forw2β iftelnetis operating in LINEMODE, these are the characters that, when typed, cause partial lines to be forwarded to the remote system. The initial value for the forwarding characters are taken from the terminal'seolandeol2characters. half-send is still a send πinterruptβ iftelnetis inlocalcharsmode (seetoggle localcharsbelow) and the interrupt character is typed, a TELNET IP sequence (seesend ipabove) is sent to the remote host. The initial value for the interrupt character is taken to be the terminal'sintrcharacter.killβ iftelnetis inlocalcharsmode (seetoggle localcharsbelow), and iftelnetis operating in ``character at a time'' mode, then when this character is typed, a TELNET EL sequence (seesend elabove) is sent to the remote system. The initial value for thekillcharacter is taken to be the terminal'skillcharacter.lnextβ iftelnetis operating in LINEMODE or ``old line by line'' mode, then this character is taken to be the terminal'slnextcharacter. The initial value for thelnextcharacter is taken to be the terminal'slnextcharacter.quitβ iftelnetis inlocalcharsmode (seetoggle localcharsbelow) and the quit character is typed, a TELNET BRK sequence (seesend brkabove) is sent to the remote host. The initial value for thequitcharacter is taken to be the terminal'squitcharacter.reprintβ iftelnetis operating in LINEMODE or ``old line by line'' mode, then this character is taken to be the terminal'sreprintcharacter. The initial value for thereprintcharacter is taken to be the terminal'sreprintcharacter.rloginβ this is therloginescape character. If set, the normal TELNET escape character is ignored unless it's preceded by this character at the beginning of a line. This character, at the beginning of a line followed by a"."closes the connection; when followed by a^Zit suspends the telnet command. The initial state is to disable therloginescape character. main character energy, honestly π
okay so, continuing the set saga β these cuties are up next, no cap:
startβ If the TELNET TOGGLE-FLOW-CONTROL option has been enabled, then this character is taken to be the terminal's start character. The initial value for the kill character is taken to be the terminal's start character.stopβ If the TELNET TOGGLE-FLOW-CONTROL option has been enabled, then this character is taken to be the terminal's stop character. The initial value for the kill character is taken to be the terminal's stop character.suspβ Iftelnetis inlocalcharsmode, or LINEMODE is enabled, and the suspend character is typed, a TELNET SUSP sequence (seesend suspabove) is sent to the remote host. The initial value for the suspend character is taken to be the terminal's suspend character.tracefileβ This is the file to which the output, caused bynetdataor option tracing being TRUE, will be written. If it is set to-, then tracing information will be written to standard output (the default).worderaseβ Iftelnetis operating in LINEMODE orold line by linemode, then this character is taken to be the terminal's worderase character. The initial value for the worderase character is taken to be the terminal's worderase character.?β Displays the legalset(unset) commands.
π slc state
The slc command (Set Local Characters) is used to set or change the state of the special characters when the TELNET LINEMODE option has been enabled. Special characters are characters that get mapped to telnet command sequences (like ip or quit) or line editing characters (like erase and kill). By default, the local special characters are exported.
checkβ Verify the current settings for the current special characters. The remote side is requested to send all the current special character settings, and if there are any discrepancies with the local side, the local side will switch to the remote value.exportβ Switch to the local defaults for the special characters. The local default characters are those of the local terminal at the time whentelnetwas started.importβ Switch to the remote defaults for the special characters. The remote default characters are those of the remote system at the time when the TELNET connection was established.?β Prints out help information for theslccommand.
π status
Show the current status of telnet. This includes the peer one is connected to, as well as the current mode. vibe check complete, bestie β¨
π₯ toggle arguments ...
Toggle (between TRUE and FALSE) various flags that control how telnet responds to events. These flags may be set explicitly to TRUE or FALSE using the set and unset commands listed above. More than one argument may be specified. The state of these flags may be interrogated with the display command. Valid arguments are:
authdebugβ Turns on debugging information for the authentication code.autoflushβ Ifautoflushandlocalcharsare both TRUE, then when theao, orquitcharacters are recognized (and transformed into TELNET sequences; seesetabove for details),telnetrefuses to display any data on the user's terminal until the remote system acknowledges (via a TELNET TIMING MARK option) that it has processed those TELNET sequences. The initial value for this toggle is TRUE if the terminal user had not done anstty noflsh, otherwise FALSE (seestty(1)).autodecryptβ When the TELNET ENCRYPT option is negotiated, by default the actual encryption (decryption) of the data stream does not start automatically. Theautoencrypt(autodecrypt) command states that encryption of the output (input) stream should be enabled as soon as possible.
Note: Because of export controls, the TELNET ENCRYPT option is not supported outside the United States and Canada.
autologinβ If the remote side supports the TELNET AUTHENTICATION optiontelnetattempts to use it to perform automatic authentication. If the AUTHENTICATION option is not supported, the user's login name are propagated through the TELNET ENVIRON option. This command is the same as specifying the-aoption on theopencommand.autosynchβ Ifautosynchandlocalcharsare both TRUE, then when either theintrorquitcharacters is typed (seesetabove for descriptions of theintrandquitcharacters), the resulting TELNET sequence sent is followed by the TELNET SYNCH sequence. This procedure should cause the remote system to begin throwing away all previously typed input until both of the TELNET sequences have been read and acted upon. The initial value of this toggle is FALSE.binaryβ Enable or disable the TELNET BINARY option on both input and output.inbinaryβ Enable or disable the TELNET BINARY option on input.outbinaryβ Enable or disable the TELNET BINARY option on output.crlfβ If this is TRUE, then carriage returns will be sent as<CR><LF>. If this is FALSE, then carriage returns will be sent as<CR><NUL>. The initial value for this toggle is FALSE.crmodβ Toggle carriage return mode. When this mode is enabled, most carriage return characters received from the remote host will be mapped into a carriage return followed by a line feed. This mode does not affect those characters typed by the user, only those received from the remote host. This mode is not very useful unless the remote host only sends carriage return, but never line feed. The initial value for this toggle is FALSE.debugβ Toggles socket level debugging (useful only to the super user). The initial value for this toggle is FALSE.encdebugβ Turns on debugging information for the encryption code.localcharsβ If this is TRUE, then theflush,interrupt,quit,erase, andkillcharacters (seesetabove) are recognized locally, and transformed into (hopefully) appropriate TELNET control sequences (respectivelyao,ip,brk,ec, andel; seesendabove). The initial value for this toggle is TRUE inold line by linemode, and FALSE incharacter at a timemode. When the LINEMODE option is enabled, the value oflocalcharsis ignored, and assumed to always be TRUE. If LINEMODE has ever been enabled, thenquitis sent asabort, andeofandsuspendare sent aseofandsusp, seesendabove).netdataβ Toggles the display of all network data (in hexadecimal format). The initial value for this toggle is FALSE.optionsβ Toggles the display of some internaltelnetprotocol processing (having to do with TELNET options). The initial value for this flag is FALSE.prettydumpβ When thenetdataflag is enabled, ifprettydumpis enabled the output from thenetdatacommand will be formatted in a more user-readable format. Spaces are put between each character in the output, and the beginning of any TELNET escape sequence is preceded by a*to aid in locating them.skiprcβ When theskiprcflag is TRUE, TELNET skips the reading of the.telnetrcfile in the user's home directory when connections are opened. The initial value for this flag is FALSE.termdataβ Toggles the display of all terminal data (in hexadecimal format). The initial value for this flag is FALSE.verbose_encryptβ When theverbose_encryptflag is TRUE, TELNET prints out a message each time encryption is enabled or disabled. The initial value for this toggle is FALSE.
Note: Because of export controls, data encryption is not supported outside of the United States and Canada.
?β Displays the legaltogglecommands.
π§ z
Suspend telnet. This command only works when the user's shell is csh(1). iykyk, shell besties π«Ά
π
! [command]
Execute a single command in a subshell on the local system. If command is omitted, then an interactive subshell is invoked. main character energy in a subshell, literally β¨
π ? command
Get help. With no arguments, telnet prints a help summary. If a command is specified, telnet will print the help information for just that command.
πΏ ENVIRONMENT
Telnet uses at least the HOME, SHELL, DISPLAY, and TERM environment variables. Other environment variables may be propagated to the other side via the TELNET ENVIRON option.
π FILES
~/.telnetrcβ user-customizedtelnetstartup values~/.k5loginβ (on remote host) file containing Kerberos principals that are allowed access.
π¦ HISTORY
The Telnet command appeared in 4.2BSD.
π NOTES
On some remote systems, echo has to be turned off manually when in old line by line mode.
In old line by line mode or LINEMODE the terminal's eof character is only recognized (and sent to the remote system) when it is the first character on a line. lowkey important, bestie β do not skip this one π
and that's the whole page, bestie β footer says TELNET(1), source/version/date flex included, and you absolutely ate this read π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: krb5-appl-clients 1.0.3-bp160.2.1 Β· MIT
- opensuse-leap 16.0: krb5-appl-clients 1.0.3-bp160.2.1 Β· MIT
- opensuse-leap 16.0: krb5-appl-clients 1.0.3-bp160.2.1 Β· MIT
- opensuse-leap 16.0: krb5-appl-clients 1.0.3-bp160.2.1 Β· MIT
- Copyright (c) 1983, 1990, 1993 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms