Commit | Line | Data |
---|---|---|
b5dc1377 | 1 | .\" Copyright (c) 1983, 1990 The Regents of the University of California. |
59ccfe44 | 2 | .\" All rights reserved. |
24854a1c | 3 | .\" |
b5dc1377 | 4 | .\" %sccs.include.redist.man% |
24854a1c | 5 | .\" |
b5dc1377 | 6 | .\" @(#)telnet.1 6.9 (Berkeley) %G% |
59ccfe44 | 7 | .\" |
b5dc1377 CL |
8 | .Dd |
9 | .Dt TELNET 1 | |
10 | .Os BSD 4.2 | |
11 | .Sh NAME | |
12 | .Nm telnet | |
13 | .Nd user interface to the | |
14 | .Li TELNET | |
15 | protocol | |
16 | .Sh SYNOPSIS | |
17 | .Nm telnet | |
18 | .Op Fl d | |
19 | .Op Fl n Ar tracefile | |
20 | .Op Ar host Op Ar port | |
21 | .Sh DESCRIPTION | |
b750597e | 22 | The |
b5dc1377 | 23 | .Nm telnet |
b750597e | 24 | command |
b5dc1377 CL |
25 | is used to communicate with another host using the |
26 | .Li TELNET | |
27 | protocol. | |
28 | If | |
29 | .Nm telnet | |
b750597e | 30 | is invoked without the |
b5dc1377 | 31 | .Ar host |
b750597e | 32 | argument, it enters command mode, |
b5dc1377 CL |
33 | indicated by its prompt |
34 | .Pq Nm telnet\&> . | |
24854a1c KM |
35 | In this mode, it accepts and executes the commands listed below. |
36 | If it is invoked with arguments, it performs an | |
b5dc1377 CL |
37 | .Ic open |
38 | command with those arguments. | |
39 | .Pp | |
40 | Options: | |
41 | .Tw Fl | |
42 | .Tp Fl d | |
43 | Sets the initial value of the | |
44 | .Ic debug | |
45 | toggle to | |
46 | .Li TRUE | |
47 | .Tp Cx Fl n | |
48 | .Cx \&\ \& | |
49 | .Ar tracefile | |
50 | .Cx | |
51 | Opens | |
52 | .Ar tracefile | |
53 | for recording trace information. | |
54 | See the | |
55 | .Ic set tracefile | |
56 | command below. | |
57 | .Tp Ar host | |
58 | Indicates the official name, an alias, or the Internet address | |
59 | of a remote host. | |
60 | .Tp Ar port | |
61 | Indicates a port number (address of an application). If a number is | |
62 | not specified, the default | |
63 | .Nm telnet | |
64 | port is used. | |
65 | .Tp | |
66 | .Pp | |
24854a1c | 67 | Once a connection has been opened, |
b5dc1377 | 68 | .Nm telnet |
b750597e | 69 | will attempt to enable the |
b5dc1377 | 70 | .Li TELNET LINEMODE |
b750597e PB |
71 | option. |
72 | If this fails, then | |
b5dc1377 | 73 | .Nm telnet |
b750597e | 74 | will revert to one of two input modes: |
b5dc1377 CL |
75 | either \*(Lqcharacter at a time\*(Rq |
76 | or \*(Lqold line by line\*(Rq | |
5c2bded5 | 77 | depending on what the remote system supports. |
b5dc1377 CL |
78 | .Pp |
79 | When | |
80 | .Li LINEMODE | |
81 | is enabled, character processing is done on the | |
b750597e PB |
82 | local system, under the control of the remote system. When input |
83 | editing or character echoing is to be disabled, the remote system | |
84 | will relay that information. The remote system will also relay | |
85 | changes to any special characters that happen on the remote | |
86 | system, so that they can take effect on the local system. | |
b5dc1377 CL |
87 | .Pp |
88 | In \*(Lqcharacter at a time\*(Rq mode, most | |
5c2bded5 | 89 | text typed is immediately sent to the remote host for processing. |
b5dc1377 CL |
90 | .Pp |
91 | In \*(Lqold line by line\*(Rq mode, all text is echoed locally, | |
5c2bded5 | 92 | and (normally) only completed lines are sent to the remote host. |
b5dc1377 | 93 | The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used |
5c2bded5 GM |
94 | to turn off and on the local echo |
95 | (this would mostly be used to enter passwords | |
96 | without the password being echoed). | |
b5dc1377 CL |
97 | .Pp |
98 | If the | |
99 | .Li LINEMODE | |
100 | option is enabled, or if the | |
101 | .Ic localchars | |
102 | toggle is TRUE (the default for \*(Lqold line by line\*(Lq; see below), | |
5c2bded5 | 103 | the user's |
b5dc1377 CL |
104 | .Ic quit , |
105 | .Ic intr , | |
5c2bded5 | 106 | and |
b5dc1377 | 107 | .Ic flush |
5c2bded5 | 108 | characters are trapped locally, and sent as |
b5dc1377 | 109 | .Li TELNET |
5c2bded5 | 110 | protocol sequences to the remote side. |
b5dc1377 CL |
111 | If |
112 | .Li LINEMODE | |
113 | has ever been enabled, then the user's | |
114 | .Ic susp | |
b750597e | 115 | and |
b5dc1377 | 116 | .Ic eof |
b750597e | 117 | are also sent as |
b5dc1377 | 118 | .Li TELNET |
b750597e PB |
119 | protocol sequences, |
120 | and | |
b5dc1377 CL |
121 | .Ic quit |
122 | is sent as a | |
123 | .Li TELNET ABORT | |
124 | instead of | |
125 | .Li BREAK | |
5c2bded5 | 126 | There are options (see |
b5dc1377 CL |
127 | .Ic toggle |
128 | .Ic autoflush | |
5c2bded5 | 129 | and |
b5dc1377 CL |
130 | .Ic toggle |
131 | .Ic autosynch | |
5c2bded5 GM |
132 | below) |
133 | which cause this action to flush subsequent output to the terminal | |
134 | (until the remote host acknowledges the | |
b5dc1377 | 135 | .Li TELNET |
5c2bded5 GM |
136 | sequence) and flush previous terminal input |
137 | (in the case of | |
b5dc1377 | 138 | .Ic quit |
5c2bded5 | 139 | and |
b5dc1377 CL |
140 | .Ic intr ) . |
141 | .Pp | |
5c2bded5 | 142 | While connected to a remote host, |
b5dc1377 | 143 | .Nm telnet |
5c2bded5 | 144 | command mode may be entered by typing the |
b5dc1377 CL |
145 | .Nm telnet |
146 | \*(Lqescape character\*(Rq (initially \*(Lq^ | |
147 | \*(Rq). | |
24854a1c | 148 | When in command mode, the normal terminal editing conventions are available. |
b5dc1377 CL |
149 | .Pp |
150 | The following .Nm telnet | |
151 | commands are available. | |
5c2bded5 GM |
152 | Only enough of each command to uniquely identify it need be typed |
153 | (this is also true for arguments to the | |
b5dc1377 CL |
154 | .Ic mode , |
155 | .Ic set , | |
156 | .Ic toggle , | |
157 | .Ic unset , | |
158 | .Ic slc , | |
5c2bded5 | 159 | and |
b5dc1377 | 160 | .Ic display |
5c2bded5 | 161 | commands). |
b5dc1377 CL |
162 | .Pp |
163 | .Tw Ic | |
164 | .Tp Ic close | |
5c2bded5 | 165 | Close a |
b5dc1377 | 166 | .Li TELNET |
5c2bded5 | 167 | session and return to command mode. |
b5dc1377 CL |
168 | .Tp Cx Ic display |
169 | .Cx \&\ \& | |
170 | .Ar argument ... | |
171 | .Cx | |
b750597e | 172 | Displays all, or some, of the |
b5dc1377 | 173 | .Ic set |
b750597e | 174 | and |
b5dc1377 | 175 | .Ic toggle |
b750597e | 176 | values (see below). |
b5dc1377 CL |
177 | .Tp Cx Ic mode |
178 | .Cx \&\ \& | |
179 | .Ar type | |
180 | .Cx | |
181 | .Ar Type | |
b750597e | 182 | is one of several options, depending on the state of the |
b5dc1377 | 183 | .Li TELNET |
b750597e | 184 | session. |
5c2bded5 GM |
185 | The remote host is asked for permission to go into the requested mode. |
186 | If the remote host is capable of entering that mode, the requested | |
187 | mode will be entered. | |
b5dc1377 CL |
188 | .Tw Ar |
189 | .Tp Ic character | |
b750597e | 190 | Disable the |
b5dc1377 | 191 | .Li TELNET LINEMODE |
b750597e | 192 | option, or, if the remote side does not understand the |
b5dc1377 CL |
193 | .Li LINEMODE |
194 | option, then enter \*(Lqcharacter at a time\*(Lq mode. | |
195 | .Tp Ic line | |
b750597e | 196 | Enable the |
b5dc1377 | 197 | .Li TELNET LINEMODE |
b750597e | 198 | option, or, if the remote side does not understand the |
b5dc1377 CL |
199 | .Li LINEMODE |
200 | option, then attempt to enter \*(Lqold-line-by-line\*(Lq mode. | |
201 | .Tp Cx Ic isig | |
202 | .Cx \&\ \& | |
203 | .Pq Ic \-isig | |
204 | .Cx | |
205 | Attempt to enable (disable) the | |
206 | .Li TRAPSIG | |
207 | mode of the | |
208 | .Li LINEMODE | |
209 | option. | |
210 | This requires that the | |
211 | .Li LINEMODE | |
212 | option be enabled. | |
213 | .Tp Cx Ic edit | |
214 | .Cx \&\ \& | |
215 | .Pq Ic \-edit | |
216 | .Cx | |
217 | Attempt to enable (disable) the | |
218 | .Li EDIT | |
219 | mode of the | |
220 | .Li LINEMODE | |
221 | option. | |
222 | This requires that the | |
223 | .Li LINEMODE | |
224 | option be enabled. | |
225 | .Tp Ic \&? | |
b750597e | 226 | Prints out help information for the |
b5dc1377 | 227 | .Ic mode |
b750597e | 228 | command. |
b5dc1377 CL |
229 | .Tp |
230 | .Tp Cx Ic open | |
231 | .Cx \&\ \& | |
232 | .Ar host | |
233 | .Cx \&\ \& | |
234 | .Cx [ | |
235 | .Op Fl | |
236 | .Cx \&\ \& | |
237 | .Ar port | |
238 | .Cx ] | |
239 | .Cx | |
b750597e PB |
240 | Open a connection to the named host. |
241 | If no port number | |
b5dc1377 CL |
242 | is specified, |
243 | .Nm telnet | |
b750597e | 244 | will attempt to contact a |
b5dc1377 | 245 | .Li TELNET |
b750597e | 246 | server at the default port. |
b5dc1377 CL |
247 | The host specification may be either a host name (see |
248 | .Xr hosts 5 ) | |
249 | or an Internet address specified in the \*(Lqdot notation\*(Rq (see | |
250 | .Xr inet 3 ) . | |
b750597e | 251 | When connecting to a non-standard port, |
b5dc1377 | 252 | .Nm telnet |
b750597e | 253 | omits any automatic initiation of |
b5dc1377 | 254 | .Li TELNET |
b750597e PB |
255 | options. When the port number is preceeded by a minus sign, |
256 | the inital option negotiation is done. | |
b5dc1377 CL |
257 | After establishing a connection, the file |
258 | .Pa \&.telnetrc | |
259 | in the | |
b750597e PB |
260 | users home directory is opened. Lines begining with a # are |
261 | comment lines. Blank lines are ignored. Lines that begin | |
262 | without whitespace are the start of a machine entry. The | |
263 | first thing on the line is the name of the machine that is | |
264 | being connected to. The rest of the line, and successive | |
265 | lines that begin with whitespace are assumed to be | |
b5dc1377 | 266 | .Nm telnet |
b750597e PB |
267 | commands and are processed as if they had been typed |
268 | in manually to the | |
b5dc1377 | 269 | .Nm telnet |
b750597e | 270 | command prompt. |
b5dc1377 | 271 | .Tp Ic quit |
b750597e | 272 | Close any open |
b5dc1377 CL |
273 | .Li TELNET |
274 | session and exit | |
275 | .Nm telnet . | |
b750597e | 276 | An end of file (in command mode) will also close a session and exit. |
b5dc1377 CL |
277 | .Tp Cx Ic send |
278 | .Cx \&\ \& | |
279 | .Ar arguments | |
280 | .Cx | |
b750597e PB |
281 | Sends one or more special character sequences to the remote host. |
282 | The following are the arguments which may be specified | |
283 | (more than one argument may be specified at a time): | |
b5dc1377 CL |
284 | .Pp |
285 | .Tw Ds | |
286 | .Tp Ic abort | |
5c2bded5 | 287 | Sends the |
b5dc1377 | 288 | .Li TELNET ABORT |
b750597e PB |
289 | (ABORT processes) |
290 | sequence. | |
b5dc1377 | 291 | .Tp Ic ao |
5c2bded5 | 292 | Sends the |
b5dc1377 | 293 | .Li TELNET AO |
5c2bded5 GM |
294 | (Abort Output) sequence, which should cause the remote system to flush |
295 | all output | |
b5dc1377 | 296 | .Em from |
5c2bded5 | 297 | the remote system |
b5dc1377 | 298 | .Em to |
5c2bded5 | 299 | the user's terminal. |
b5dc1377 | 300 | .Tp Ic ayt |
5c2bded5 | 301 | Sends the |
b5dc1377 | 302 | .Li TELNET AYT |
5c2bded5 | 303 | (Are You There) |
349a83e1 | 304 | sequence, to which the remote system may or may not choose to respond. |
b5dc1377 | 305 | .Tp Ic brk |
5c2bded5 | 306 | Sends the |
b5dc1377 | 307 | .Li TELNET BRK |
b750597e PB |
308 | (Break) sequence, which may have significance to the remote |
309 | system. | |
b5dc1377 | 310 | .Tp Ic ec |
b750597e | 311 | Sends the |
b5dc1377 | 312 | .Li TELNET EC |
5c2bded5 GM |
313 | (Erase Character) |
314 | sequence, which should cause the remote system to erase the last character | |
315 | entered. | |
b5dc1377 | 316 | .Tp Ic el |
5c2bded5 | 317 | Sends the |
b5dc1377 | 318 | .Li TELNET EL |
5c2bded5 GM |
319 | (Erase Line) |
320 | sequence, which should cause the remote system to erase the line currently | |
321 | being entered. | |
b5dc1377 | 322 | .Tp Ic eof |
b750597e | 323 | Sends the |
b5dc1377 | 324 | .Li TELNET EOF |
b750597e PB |
325 | (End Of File) |
326 | sequence. | |
b5dc1377 | 327 | .Tp Ic eor |
b750597e | 328 | Sends the |
b5dc1377 | 329 | .Li TELNET EOR |
b750597e PB |
330 | (End of Record) |
331 | sequence. | |
b5dc1377 | 332 | .Tp Ic escape |
b750597e | 333 | Sends the current |
b5dc1377 CL |
334 | .Nm telnet |
335 | escape character (initially \*(Lq^\*(Rq). | |
336 | .Tp Ic ga | |
5c2bded5 | 337 | Sends the |
b5dc1377 | 338 | .Li TELNET GA |
5c2bded5 GM |
339 | (Go Ahead) |
340 | sequence, which likely has no significance to the remote system. | |
b5dc1377 | 341 | .Tp Ic getstatus |
6570c863 | 342 | If the remote side supports the |
b5dc1377 | 343 | .Li TELNET STATUS |
6570c863 | 344 | command, |
b5dc1377 | 345 | .Ic getstatus |
6570c863 PB |
346 | will send the subnegotiation to request that the server send |
347 | its current option status. | |
b5dc1377 | 348 | .Tp Ic ip |
5c2bded5 | 349 | Sends the |
b5dc1377 | 350 | .Li TELNET IP |
b750597e PB |
351 | (Interrupt Process) sequence, which should cause the remote |
352 | system to abort the currently running process. | |
b5dc1377 | 353 | .Tp Ic nop |
b750597e | 354 | Sends the |
b5dc1377 | 355 | .Li TELNET NOP |
5c2bded5 GM |
356 | (No OPeration) |
357 | sequence. | |
b5dc1377 | 358 | .Tp Ic susp |
b750597e | 359 | Sends the |
b5dc1377 | 360 | .Li TELNET SUSP |
b750597e PB |
361 | (SUSPend process) |
362 | sequence. | |
b5dc1377 | 363 | .Tp Ic synch |
b750597e | 364 | Sends the |
b5dc1377 | 365 | .Li TELNET SYNCH |
b750597e PB |
366 | sequence. |
367 | This sequence causes the remote system to discard all previously typed | |
368 | (but not yet read) input. | |
369 | This sequence is sent as TCP urgent | |
370 | data (and may not work if the remote system is a 4.2 BSD system -- if | |
b5dc1377 CL |
371 | it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal). |
372 | .Tp Ic \&? | |
5c2bded5 | 373 | Prints out help information for the |
b5dc1377 | 374 | .Ic send |
5c2bded5 | 375 | command. |
b5dc1377 CL |
376 | .Tp |
377 | .Tp Cx Ic set | |
378 | .Cx \&\ \& | |
379 | .Ar argument value | |
380 | .Cx | |
381 | .Tp Cx Ic unset | |
382 | .Cx \&\ \& | |
383 | .Ar argument value | |
384 | .Cx | |
b750597e | 385 | The |
b5dc1377 | 386 | .Ic set |
b750597e | 387 | command will set any one of a number of |
b5dc1377 | 388 | .Nm telnet |
b750597e | 389 | variables to a specific value or to TRUE. |
b5dc1377 CL |
390 | The special value |
391 | .Ic off | |
392 | turns off the function associated with | |
b750597e | 393 | the variable, this is equivalent to using the |
b5dc1377 | 394 | .Ic unset |
b750597e PB |
395 | command. |
396 | The | |
b5dc1377 | 397 | .Ic unset |
b750597e | 398 | command will disable or set to FALSE any of the specified functions. |
349a83e1 | 399 | The values of variables may be interrogated with the |
b5dc1377 | 400 | .Ic display |
349a83e1 | 401 | command. |
b750597e PB |
402 | The variables which may be set or unset, but not toggled, are |
403 | listed here. In addition, any of the variables for the | |
b5dc1377 CL |
404 | .Ic toggle |
405 | command may be explicitly set or unset using | |
406 | the | |
407 | .Ic set | |
408 | and | |
409 | .Ic unset | |
410 | commands. | |
411 | .Tw Fl | |
412 | .Tp Ic echo | |
413 | This is the value (initially \*(Lq^E\*(Rq) which, when in | |
414 | \*(Lqline by line\*(Rq mode, toggles between doing local echoing | |
5c2bded5 GM |
415 | of entered characters (for normal processing), and suppressing |
416 | echoing of entered characters (for entering, say, a password). | |
b5dc1377 | 417 | .Tp Ic eof |
b750597e | 418 | If |
b5dc1377 | 419 | .Nm telnet |
b750597e | 420 | is operating in |
b5dc1377 CL |
421 | .Li LINEMODE |
422 | or \*(Lqold line by line\*(Rq mode, entering this character | |
b750597e PB |
423 | as the first character on a line will cause this character to be |
424 | sent to the remote system. | |
425 | The initial value of the eof character is taken to be the terminal's | |
b5dc1377 | 426 | .Ic eof |
b750597e | 427 | character. |
b5dc1377 | 428 | .Tp Ic erase |
5c2bded5 | 429 | If |
b5dc1377 | 430 | .Nm telnet |
5c2bded5 | 431 | is in |
b5dc1377 | 432 | .Ic localchars |
5c2bded5 | 433 | mode (see |
b5dc1377 CL |
434 | .Ic toggle |
435 | .Ic localchars | |
b750597e | 436 | below), |
b5dc1377 | 437 | .Sy and |
b750597e | 438 | if |
b5dc1377 CL |
439 | .Nm telnet |
440 | is operating in \*(Lqcharacter at a time\*(Rq mode, then when this | |
5c2bded5 | 441 | character is typed, a |
b5dc1377 | 442 | .Li TELNET EC |
5c2bded5 | 443 | sequence (see |
b5dc1377 CL |
444 | .Ic send |
445 | .Ic ec | |
5c2bded5 | 446 | above) |
b750597e PB |
447 | is sent to the remote system. |
448 | The initial value for the erase character is taken to be | |
5c2bded5 | 449 | the terminal's |
b5dc1377 | 450 | .Ic erase |
5c2bded5 | 451 | character. |
b5dc1377 | 452 | .Tp Ic escape |
b750597e | 453 | This is the |
b5dc1377 CL |
454 | .Nm telnet |
455 | escape character (initially \*(Lq^[\*(Rq) which causes entry | |
b750597e | 456 | into |
b5dc1377 | 457 | .Nm telnet |
b750597e | 458 | command mode (when connected to a remote system). |
b5dc1377 | 459 | .Tp Ic flushoutput |
5c2bded5 | 460 | If |
b5dc1377 | 461 | .Nm telnet |
5c2bded5 | 462 | is in |
b5dc1377 | 463 | .Ic localchars |
5c2bded5 | 464 | mode (see |
b5dc1377 CL |
465 | .Ic toggle |
466 | .Ic localchars | |
5c2bded5 GM |
467 | below) |
468 | and the | |
b5dc1377 | 469 | .Ic flushoutput |
5c2bded5 | 470 | character is typed, a |
b5dc1377 | 471 | .Li TELNET AO |
5c2bded5 | 472 | sequence (see |
b5dc1377 CL |
473 | .Ic send |
474 | .Ic ao | |
5c2bded5 GM |
475 | above) |
476 | is sent to the remote host. | |
b750597e | 477 | The initial value for the flush character is taken to be |
5c2bded5 | 478 | the terminal's |
b5dc1377 | 479 | .Ic flush |
5c2bded5 | 480 | character. |
b5dc1377 | 481 | .Tp Ic interrupt |
5c2bded5 | 482 | If |
b5dc1377 | 483 | .Nm telnet |
5c2bded5 | 484 | is in |
b5dc1377 | 485 | .Ic localchars |
5c2bded5 | 486 | mode (see |
b5dc1377 CL |
487 | .Ic toggle |
488 | .Ic localchars | |
5c2bded5 GM |
489 | below) |
490 | and the | |
b5dc1377 | 491 | .Ic interrupt |
5c2bded5 | 492 | character is typed, a |
b5dc1377 | 493 | .Li TELNET IP |
5c2bded5 | 494 | sequence (see |
b5dc1377 CL |
495 | .Ic send |
496 | .Ic ip | |
5c2bded5 GM |
497 | above) |
498 | is sent to the remote host. | |
b750597e | 499 | The initial value for the interrupt character is taken to be |
5c2bded5 | 500 | the terminal's |
b5dc1377 | 501 | .Ic intr |
5c2bded5 | 502 | character. |
b5dc1377 | 503 | .Tp Ic kill |
5c2bded5 | 504 | If |
b5dc1377 | 505 | .Nm telnet |
5c2bded5 | 506 | is in |
b5dc1377 | 507 | .Ic localchars |
5c2bded5 | 508 | mode (see |
b5dc1377 CL |
509 | .Ic toggle |
510 | .Ic localchars | |
5c2bded5 | 511 | below), |
b5dc1377 | 512 | .Ic and |
5c2bded5 | 513 | if |
b5dc1377 CL |
514 | .Nm telnet |
515 | is operating in \*(Lqcharacter at a time\*(Rq mode, then when this | |
5c2bded5 | 516 | character is typed, a |
b5dc1377 | 517 | .Li TELNET EL |
5c2bded5 | 518 | sequence (see |
b5dc1377 CL |
519 | .Ic send |
520 | .Ic el | |
5c2bded5 GM |
521 | above) |
522 | is sent to the remote system. | |
b750597e | 523 | The initial value for the kill character is taken to be |
5c2bded5 | 524 | the terminal's |
b5dc1377 | 525 | .Ic kill |
b750597e | 526 | character. |
b5dc1377 | 527 | .Tp Ic lnext |
b750597e | 528 | If |
b5dc1377 | 529 | .Nm telnet |
b750597e | 530 | is operating in |
b5dc1377 CL |
531 | .Li LINEMODE |
532 | or \*(Lqold line by line\*(Lq mode, then this character is taken to | |
b750597e | 533 | be the terminal's |
b5dc1377 | 534 | .Ic lnext |
b750597e PB |
535 | character. |
536 | The initial value for the lnext character is taken to be | |
537 | the terminal's | |
b5dc1377 | 538 | .Ic lnext |
5c2bded5 | 539 | character. |
b5dc1377 | 540 | .Tp Ic quit |
5c2bded5 | 541 | If |
b5dc1377 | 542 | .Nm telnet |
5c2bded5 | 543 | is in |
b5dc1377 | 544 | .Ic localchars |
5c2bded5 | 545 | mode (see |
b5dc1377 CL |
546 | .Ic toggle |
547 | .Ic localchars | |
b750597e PB |
548 | below) |
549 | and the | |
b5dc1377 | 550 | .Ic quit |
5c2bded5 | 551 | character is typed, a |
b5dc1377 | 552 | .Li TELNET BRK |
5c2bded5 | 553 | sequence (see |
b5dc1377 CL |
554 | .Ic send |
555 | .Ic brk | |
5c2bded5 | 556 | above) |
b750597e PB |
557 | is sent to the remote host. |
558 | The initial value for the quit character is taken to be | |
559 | the terminal's | |
b5dc1377 | 560 | .Ic quit |
b750597e | 561 | character. |
b5dc1377 | 562 | .Tp Ic reprint |
b750597e | 563 | If |
b5dc1377 | 564 | .Nm telnet |
b750597e | 565 | is operating in |
b5dc1377 CL |
566 | .Li LINEMODE |
567 | or \*(Lqold line by line\*(Lq mode, then this character is taken to | |
b750597e | 568 | be the terminal's |
b5dc1377 | 569 | .Ic reprint |
b750597e PB |
570 | character. |
571 | The initial value for the reprint character is taken to be | |
572 | the terminal's | |
b5dc1377 | 573 | .Ic reprint |
b750597e | 574 | character. |
b5dc1377 | 575 | .Tp Ic start |
b750597e | 576 | If the |
b5dc1377 | 577 | .Li TELNET TOGGLE-FLOW-CONTROL |
b750597e PB |
578 | option has been enabled, |
579 | then this character is taken to | |
580 | be the terminal's | |
b5dc1377 | 581 | .Ic start |
b750597e | 582 | character. |
5c2bded5 GM |
583 | The initial value for the kill character is taken to be |
584 | the terminal's | |
b5dc1377 | 585 | .Ic start |
5c2bded5 | 586 | character. |
b5dc1377 | 587 | .Tp Ic stop |
b750597e | 588 | If the |
b5dc1377 | 589 | .Li TELNET TOGGLE-FLOW-CONTROL |
b750597e PB |
590 | option has been enabled, |
591 | then this character is taken to | |
592 | be the terminal's | |
b5dc1377 | 593 | .Ic stop |
b750597e PB |
594 | character. |
595 | The initial value for the kill character is taken to be | |
596 | the terminal's | |
b5dc1377 | 597 | .Ic stop |
b750597e | 598 | character. |
b5dc1377 | 599 | .Tp Ic susp |
5c2bded5 | 600 | If |
b5dc1377 | 601 | .Nm telnet |
b750597e | 602 | is in |
b5dc1377 | 603 | .Ic localchars |
b750597e | 604 | mode, or |
b5dc1377 | 605 | .Li LINEMODE |
b750597e | 606 | is enabled, and the |
b5dc1377 | 607 | .Ic suspend |
b750597e | 608 | character is typed, a |
b5dc1377 | 609 | .Li TELNET SUSP |
b750597e | 610 | sequence (see |
b5dc1377 CL |
611 | .Ic send |
612 | .Ic susp | |
b750597e PB |
613 | above) |
614 | is sent to the remote host. | |
615 | The initial value for the suspend character is taken to be | |
616 | the terminal's | |
b5dc1377 | 617 | .Ic suspend |
b750597e | 618 | character. |
b5dc1377 CL |
619 | .Tp Ic tracefile |
620 | Thi is the file to which the output, caused by | |
621 | .Ic netdata | |
622 | or | |
623 | .Ic option | |
624 | tracing being TRUE, will be written. If it is set to | |
625 | .Dq Fl , | |
b750597e | 626 | then tracing information will be written to standard output (the default). |
b5dc1377 | 627 | .Tp Ic worderase |
b750597e | 628 | If |
b5dc1377 | 629 | .Nm telnet |
b750597e | 630 | is operating in |
b5dc1377 CL |
631 | .Li LINEMODE |
632 | or \*(Lqold line by line\*(Lq mode, then this character is taken to | |
b750597e | 633 | be the terminal's |
b5dc1377 | 634 | .Ic worderase |
b750597e PB |
635 | character. |
636 | The initial value for the worderase character is taken to be | |
637 | the terminal's | |
b5dc1377 | 638 | .Ic worderase |
5c2bded5 | 639 | character. |
b5dc1377 CL |
640 | .Tp |
641 | .Tp Cx Ic slc | |
642 | .Cx \&\ \& | |
643 | .Ar state | |
644 | .Cx | |
b750597e | 645 | The |
b5dc1377 | 646 | .Ic slc |
b750597e PB |
647 | command (Set Local Characters) is used to set |
648 | or change the state of the the special | |
b5dc1377 CL |
649 | characters when the |
650 | .Li TELNET LINEMODE | |
651 | option has | |
b750597e | 652 | been enabled. Special characters are characters that get |
b5dc1377 CL |
653 | mapped to |
654 | .Li TELNET | |
655 | commands sequences (like | |
656 | .Ic ip | |
b750597e | 657 | or |
b5dc1377 | 658 | .Ic quit ) |
b750597e | 659 | or line editing characters (like |
b5dc1377 | 660 | .Ic erase |
b750597e | 661 | and |
b5dc1377 | 662 | .Ic kill ) . |
b750597e | 663 | By default, the local special characters are exported. |
b5dc1377 CL |
664 | .Tw Fl |
665 | .Tp Ic export | |
b750597e PB |
666 | Switch to the local defaults for the special characters. The |
667 | local default characters are those of the local terminal at | |
668 | the time when | |
b5dc1377 | 669 | .Nm telnet |
b750597e | 670 | was started. |
b5dc1377 | 671 | .Tp Ic import |
b750597e PB |
672 | Switch to the remote defaults for the special characters. |
673 | The remote default characters are those of the remote system | |
b5dc1377 CL |
674 | at the time when the |
675 | .Li TELNET | |
676 | connection was established. | |
677 | .Tp Ic check | |
b750597e PB |
678 | Verify the current settings for the current special characters. |
679 | The remote side is requested to send all the current special | |
680 | character settings, and if there are any discrepencies with | |
681 | the local side, the local side will switch to the remote value. | |
b5dc1377 | 682 | .Ic Ic \&? |
b750597e | 683 | Prints out help information for the |
b5dc1377 | 684 | .Ic slc |
b750597e | 685 | command. |
b5dc1377 CL |
686 | .Tp |
687 | .Tp Ic \&? | |
b750597e | 688 | Displays the legal |
b5dc1377 CL |
689 | .Ic set |
690 | .Pq Ic unset | |
b750597e | 691 | commands. |
b5dc1377 CL |
692 | .Tp Cx Ic toggle |
693 | .Cx \&\ \& | |
694 | .Ar arguments ... | |
695 | .Cx | |
5c2bded5 GM |
696 | Toggle (between |
697 | TRUE | |
698 | and | |
699 | FALSE) | |
700 | various flags that control how | |
b5dc1377 | 701 | .Nm telnet |
5c2bded5 | 702 | responds to events. |
b750597e PB |
703 | These flags may be set explicitly to TRUE or FALSE |
704 | using the | |
b5dc1377 | 705 | .Ic set |
b750597e | 706 | and |
b5dc1377 | 707 | .Ic unset |
b750597e | 708 | commands listed above. |
5c2bded5 | 709 | More than one argument may be specified. |
349a83e1 | 710 | The state of these flags may be interrogated with the |
b5dc1377 | 711 | .Ic display |
349a83e1 | 712 | command. |
5c2bded5 | 713 | Valid arguments are: |
b5dc1377 CL |
714 | .Tw Ar |
715 | .Tp Ic autoflush | |
5c2bded5 | 716 | If |
b5dc1377 | 717 | .Ic autoflush |
5c2bded5 | 718 | and |
b5dc1377 | 719 | .Ic localchars |
5c2bded5 GM |
720 | are both |
721 | TRUE, | |
722 | then when the | |
b5dc1377 | 723 | .Ic ao , |
5c2bded5 | 724 | or |
b5dc1377 | 725 | .Ic quit |
5c2bded5 | 726 | characters are recognized (and transformed into |
b5dc1377 | 727 | .Li TELNET |
5c2bded5 | 728 | sequences; see |
b5dc1377 | 729 | .Ic set |
5c2bded5 | 730 | above for details), |
b5dc1377 | 731 | .Nm telnet |
5c2bded5 GM |
732 | refuses to display any data on the user's terminal |
733 | until the remote system acknowledges (via a | |
b5dc1377 | 734 | .Li TELNET TIMING MARK |
5c2bded5 GM |
735 | option) |
736 | that it has processed those | |
b5dc1377 | 737 | .Li TELNET |
5c2bded5 GM |
738 | sequences. |
739 | The initial value for this toggle is TRUE if the terminal user had not | |
740 | done an "stty noflsh", otherwise FALSE (see | |
b5dc1377 CL |
741 | .Xr stty 1 ) . |
742 | .Tp Ic autosynch | |
349a83e1 | 743 | If |
b5dc1377 | 744 | .Ic autosynch |
349a83e1 | 745 | and |
b5dc1377 | 746 | .Ic localchars |
349a83e1 MK |
747 | are both |
748 | TRUE, | |
749 | then when either the | |
b5dc1377 | 750 | .Ic intr |
349a83e1 | 751 | or |
b5dc1377 | 752 | .Ic quit |
349a83e1 | 753 | characters is typed (see |
b5dc1377 | 754 | .Ic set |
349a83e1 | 755 | above for descriptions of the |
b5dc1377 | 756 | .Ic intr |
349a83e1 | 757 | and |
b5dc1377 | 758 | .Ic quit |
349a83e1 | 759 | characters), the resulting |
b5dc1377 | 760 | .Li TELNET |
349a83e1 | 761 | sequence sent is followed by the |
b5dc1377 | 762 | .Li TELNET SYNCH |
349a83e1 MK |
763 | sequence. |
764 | This procedure | |
b5dc1377 | 765 | .Ic should |
349a83e1 MK |
766 | cause the remote system to begin throwing away all previously |
767 | typed input until both of the | |
b5dc1377 | 768 | .Li TELNET |
349a83e1 MK |
769 | sequences have been read and acted upon. |
770 | The initial value of this toggle is FALSE. | |
b5dc1377 | 771 | .Tp Ic binary |
b750597e | 772 | Enable or disable the |
b5dc1377 | 773 | .Li TELNET BINARY |
6570c863 | 774 | option on both input and output. |
b5dc1377 | 775 | .Tp Ic inbinary |
6570c863 | 776 | Enable or disable the |
b5dc1377 | 777 | .Li TELNET BINARY |
6570c863 | 778 | option on input. |
b5dc1377 | 779 | .Tp Ic outbinary |
6570c863 | 780 | Enable or disable the |
b5dc1377 | 781 | .Li TELNET BINARY |
6570c863 | 782 | option on output. |
b5dc1377 | 783 | .Tp Ic crlf |
b750597e PB |
784 | If this is TRUE, then carriage returns will be sent as <CR><LF>. |
785 | If this is FALSE, then carriage returns will be send as <CR><NUL>. | |
786 | The initial value for this toggle is FALSE. | |
b5dc1377 | 787 | .Tp Ic crmod |
5c2bded5 GM |
788 | Toggle carriage return mode. |
789 | When this mode is enabled, most carriage return characters received from | |
790 | the remote host will be mapped into a carriage return followed by | |
791 | a line feed. | |
792 | This mode does not affect those characters typed by the user, only | |
793 | those received from the remote host. | |
794 | This mode is not very useful unless the remote host | |
795 | only sends carriage return, but never line feed. | |
796 | The initial value for this toggle is FALSE. | |
b5dc1377 | 797 | .Tp Ic debug |
5c2bded5 | 798 | Toggles socket level debugging (useful only to the |
b5dc1377 | 799 | .Ic super user ) . |
5c2bded5 | 800 | The initial value for this toggle is FALSE. |
b5dc1377 | 801 | .Tp Ic localchars |
b750597e PB |
802 | If this is |
803 | TRUE, | |
804 | then the | |
b5dc1377 CL |
805 | .Ic flush , |
806 | .Ic quit , | |
b750597e | 807 | and |
b5dc1377 | 808 | .Ic kill |
b750597e | 809 | characters (see |
b5dc1377 | 810 | .Ic set |
b750597e | 811 | above) are recognized locally, and transformed into (hopefully) appropriate |
b5dc1377 | 812 | .Li TELNET |
b750597e PB |
813 | control sequences |
814 | (respectively | |
b5dc1377 CL |
815 | .Ic ao , |
816 | .Ic brk , | |
b750597e | 817 | and |
b5dc1377 | 818 | .Ic el ; |
b750597e | 819 | see |
b5dc1377 | 820 | .Ic send |
b750597e | 821 | above). |
b5dc1377 CL |
822 | The initial value for this toggle is TRUE in \*(Lqold line by line\*(Rq mode, |
823 | and FALSE in \*(Lqcharacter at a time\*(Rq mode. | |
b750597e | 824 | When the |
b5dc1377 | 825 | .Li LINEMODE |
b750597e | 826 | option is enabled, the value of |
b5dc1377 | 827 | .Ic localchars |
b750597e PB |
828 | is ignored, and assumed to always be TRUE. |
829 | If | |
b5dc1377 | 830 | .Li LINEMODE |
b750597e | 831 | has ever been enabled, then |
b5dc1377 | 832 | .Ic quit |
b750597e | 833 | is sent as |
b5dc1377 | 834 | .Ic abort , |
b750597e | 835 | and |
b5dc1377 | 836 | .Ic eof and |
b750597e PB |
837 | .B suspend |
838 | are sent as | |
b5dc1377 | 839 | .Ic eof and |
b750597e | 840 | see |
b5dc1377 | 841 | .Ic send |
b750597e | 842 | above). |
b5dc1377 | 843 | .Tp Ic netdata |
b750597e PB |
844 | Toggles the display of all network data (in hexadecimal format). |
845 | The initial value for this toggle is FALSE. | |
b5dc1377 | 846 | .Tp Ic options |
5c2bded5 | 847 | Toggles the display of some internal |
b5dc1377 | 848 | .Nm telnet |
5c2bded5 | 849 | protocol processing (having to do with |
b5dc1377 | 850 | .Li TELNET |
5c2bded5 GM |
851 | options). |
852 | The initial value for this toggle is FALSE. | |
b5dc1377 | 853 | .Tp Ic prettydump |
b750597e | 854 | When the |
b5dc1377 | 855 | .Ic netdata |
b750597e | 856 | toggle is enabled, if |
b5dc1377 | 857 | .Ic prettydump |
b750597e | 858 | is enabled the output from the |
b5dc1377 | 859 | .Ic netdata |
b750597e PB |
860 | command will be formated in a more user readable format. |
861 | Spaces are put between each character in the output, and the | |
862 | begining of any | |
b5dc1377 | 863 | .Li TELNET |
b750597e | 864 | escape sequence is preceeded by a '*' to aid in locating them. |
b5dc1377 | 865 | .Tp Ic \&? |
5c2bded5 | 866 | Displays the legal |
b5dc1377 | 867 | .Ic toggle |
5c2bded5 | 868 | commands. |
b5dc1377 CL |
869 | .Tp |
870 | .Tp Ic z | |
b750597e | 871 | Suspend |
b5dc1377 CL |
872 | .Nm telnet . |
873 | This command only works when the user is using the | |
874 | .Xr csh 1 . | |
875 | .Tp Cx Ic \&! | |
876 | .Cx \&\ \& | |
877 | .Op Ar command | |
878 | .Cx | |
b750597e | 879 | Execute a single command in a subshell on the local |
b5dc1377 CL |
880 | system. If |
881 | .Ic command | |
882 | is ommitted, then an interactive | |
b750597e | 883 | subshell is invoked. |
b5dc1377 CL |
884 | .Tp Ic status |
885 | Show the current status of | |
886 | .Nm telnet . | |
b750597e PB |
887 | This includes the peer one is connected to, as well |
888 | as the current mode. | |
b5dc1377 CL |
889 | .Tp Cx Ic \&? |
890 | .Cx \&\ \& | |
891 | .Op Ar command | |
892 | .Cx | |
b750597e | 893 | Get help. With no arguments, |
b5dc1377 | 894 | .Nm telnet |
b750597e | 895 | prints a help summary. |
b5dc1377 CL |
896 | If a command is specified, |
897 | .Nm telnet | |
b750597e | 898 | will print the help information for just that command. |
b5dc1377 CL |
899 | .Sh ENVIRONMENT |
900 | .Nm Telnet | |
901 | uses the | |
902 | .Ev HOME , | |
903 | .Ev SHELL | |
904 | and | |
905 | .Ev TERM | |
906 | environent variables. | |
907 | .Sh FILES | |
908 | .Dw ~/.telnetrc | |
909 | .Di L | |
910 | .Dp Pa ~/.telnetrc | |
911 | user customized telnet startup values | |
912 | .Dp | |
913 | .Sh HISTORY | |
914 | .Nm Telnet | |
915 | appeared in 4.2 BSD. | |
916 | .Sh NOTES | |
917 | .Pp | |
5c2bded5 | 918 | On some remote systems, echo has to be turned off manually when in |
b5dc1377 CL |
919 | \*(Lqold line by line\*(Rq mode. |
920 | .Pp | |
921 | In \*(Lqold line by line\*(Rq mode or | |
922 | .Li LINEMODE | |
923 | the terminal's | |
924 | .Ic eof | |
5c2bded5 GM |
925 | character is only recognized (and sent to the remote system) |
926 | when it is the first character on a line. |