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