Annotation of src/usr.bin/tip/tip.1, Revision 1.14
1.13 hugh 1: .\" $OpenBSD: tip.1,v 1.12 2001/05/01 17:58:05 aaron Exp $
1.1 deraadt 2: .\" $NetBSD: tip.1,v 1.7 1994/12/08 09:31:05 jtc Exp $
3: .\"
4: .\" Copyright (c) 1980, 1990, 1993
5: .\" The Regents of the University of California. All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
15: .\" 3. All advertising materials mentioning features or use of this software
16: .\" must display the following acknowledgement:
17: .\" This product includes software developed by the University of
18: .\" California, Berkeley and its contributors.
19: .\" 4. Neither the name of the University nor the names of its contributors
20: .\" may be used to endorse or promote products derived from this software
21: .\" without specific prior written permission.
22: .\"
23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33: .\" SUCH DAMAGE.
34: .\"
35: .\" @(#)tip.1 8.4 (Berkeley) 4/18/94
36: .\"
37: .Dd April 18, 1994
38: .Dt TIP 1
1.6 aaron 39: .Os
1.1 deraadt 40: .Sh NAME
1.6 aaron 41: .Nm tip
1.1 deraadt 42: .\" .Nm cu
43: .Nd connect to a remote system
44: .Sh SYNOPSIS
45: .Nm tip
1.3 todd 46: .Op Fl nv
1.14 ! krw 47: .Op Fl Ar speed
! 48: .Op Ar system\-name
1.1 deraadt 49: .\" .Nm cu
50: .\" .Ar phone\-number
51: .\" .Op Fl t
52: .\" .Op Fl s Ar speed
53: .\" .Op Fl a Ar acu
54: .\" .Op Fl l Ar line
55: .\" .Op Fl #
56: .Sh DESCRIPTION
1.7 aaron 57: .Nm
1.1 deraadt 58: .\" and
59: .\" .Nm cu
1.14 ! krw 60: establishes a full-duplex connection to another machine, giving the
! 61: appearance of being logged in directly on the remote CPU.
! 62: It goes without saying that you must have a login on the machine (or
! 63: equivalent) to which you wish to connect.
1.1 deraadt 64: .\" The preferred interface is
1.4 aaron 65: .\" .Nm tip .
1.1 deraadt 66: .\" The
67: .\" .Nm cu
68: .\" interface is included for those people attached to the
69: .\" ``call
70: .\" .Ux Ns ''
71: .\" command of version 7. This manual page
72: .\" describes only
1.4 aaron 73: .\" .Nm tip .
1.1 deraadt 74: .Pp
1.6 aaron 75: The options are as follows:
1.14 ! krw 76: .Bl -tag -offset indent -width 4n
1.1 deraadt 77: .It Fl v
78: Set verbose mode.
1.3 todd 79: .It Fl n
80: No escape (disable tilde).
1.1 deraadt 81: .El
82: .Pp
1.14 ! krw 83: If
! 84: .Ar speed
! 85: is specified it will override any baudrate specified in the system
! 86: description being used.
! 87: .Pp
! 88: If neither
! 89: .Ar speed
! 90: nor
! 91: .Ar system-name
! 92: are specified,
! 93: .Ar system-name
! 94: will be set to the value of the
! 95: .Ev HOST
! 96: environment variable.
! 97: .Pp
! 98: If
! 99: .Ar speed
! 100: is specified but
! 101: .Ar system-name
! 102: is not,
! 103: .Ar system-name
! 104: will be set to a value of 'tip' with
! 105: .Ar speed
! 106: appended.
! 107: e.g.
! 108: .Ic tip -1200
! 109: will set
! 110: .Ar system-name
! 111: to 'tip1200'.
! 112: .Pp
1.1 deraadt 113: Typed characters are normally transmitted directly to the remote
1.7 aaron 114: machine (which does the echoing as well).
115: A tilde
1.6 aaron 116: .Pq Ql ~
1.14 ! krw 117: appearing as the first character of a line is an escape signal; the
! 118: following are recognized:
! 119: .Bl -tag -offset indent -width Fl
1.1 deraadt 120: .It Ic \&~^D No or Ic \&~ .
1.14 ! krw 121: Drop the connection and exit (you may still be logged in on the remote
! 122: machine).
1.6 aaron 123: .It Ic \&~c Op Ar name
1.1 deraadt 124: Change directory to
125: .Ar name
1.14 ! krw 126: (no argument implies change to your home directory).
1.1 deraadt 127: .It Ic \&~!
1.4 aaron 128: Escape to a shell (exiting the shell will return you to
129: .Nm tip Ns ).
1.1 deraadt 130: .It Ic \&~>
131: Copy file from local to remote.
1.7 aaron 132: .Nm
1.1 deraadt 133: prompts for the name of a local file to transmit.
134: .It Ic \&~<
135: Copy file from remote to local.
1.7 aaron 136: .Nm
1.14 ! krw 137: prompts first for the name of the file to be sent, then for a command
! 138: to be executed on the remote machine.
1.6 aaron 139: .It Ic \&~p Ar from Op Ar to
1.1 deraadt 140: Send a file to a remote
141: .Ux
1.7 aaron 142: host.
143: The put command causes the remote
1.1 deraadt 144: .Ux
1.6 aaron 145: system to run the command string
146: .Dq cat > 'to' ,
147: while
1.7 aaron 148: .Nm
1.6 aaron 149: sends it the
150: .Dq from
1.7 aaron 151: file.
152: If the
1.6 aaron 153: .Dq to
154: file isn't specified the
155: .Dq from
156: file name is used.
157: this command is actually a
1.1 deraadt 158: .Ux
1.6 aaron 159: specific version of the
160: .Ic ~>
161: command.
162: .It Ic \&~t Ar from Op Ar to
1.1 deraadt 163: Take a file from a remote
164: .Ux
165: host.
1.6 aaron 166: As in the put command the
167: .Dq to
1.14 ! krw 168: file defaults to the
1.6 aaron 169: .Dq from
170: file name if it isn't specified.
1.14 ! krw 171: The remote host executes the command string
1.6 aaron 172: .Dq cat 'from';echo ^A
173: to send the file to
1.4 aaron 174: .Nm tip .
1.1 deraadt 175: .It Ic \&~|
176: Pipe the output from a remote command to a local
177: .Ux
178: process.
179: The command string sent to the local
180: .Ux
181: system is processed by the shell.
182: .It Ic \&~$
183: Pipe the output from a local
184: .Ux
185: process to the remote host.
186: The command string sent to the local
187: .Ux
188: system is processed by the shell.
189: .It Ic \&~C
190: Fork a child process on the local system to perform special protocols
1.7 aaron 191: such as \s-1XMODEM\s+1.
1.14 ! krw 192: The child program will be run with the following somewhat unusual
! 193: arrangement of file descriptors:
! 194: .Bd -literal -offset indent
1.1 deraadt 195: 0 <-> local tty in
196: 1 <-> local tty out
197: 2 <-> local tty out
198: 3 <-> remote tty in
199: 4 <-> remote tty out
1.14 ! krw 200: .Ed
1.1 deraadt 201: .It Ic \&~#
202: Send a
203: .Dv BREAK
204: to the remote system.
1.14 ! krw 205: For systems which don't support the necessary
1.4 aaron 206: .Fn ioctl
1.14 ! krw 207: call the break is simulated by a sequence of line speed changes and
! 208: DEL characters.
1.1 deraadt 209: .It Ic \&~s
210: Set a variable (see the discussion below).
211: .It Ic \&~^Z
212: Stop
1.6 aaron 213: .Nm
1.1 deraadt 214: (only available with job control).
215: .It Ic \&~^Y
1.6 aaron 216: Stop only the
217: .Dq local side
218: of
219: .Nm
1.14 ! krw 220: (only available with job control); the
1.6 aaron 221: .Dq remote side
222: of
1.4 aaron 223: .Nm tip ,
1.1 deraadt 224: the side that displays output from the remote host, is left running.
225: .It Ic \&~?
1.4 aaron 226: Get a summary of the tilde escapes.
1.1 deraadt 227: .El
228: .Pp
1.14 ! krw 229: To find the system description and thus the operating characteristics
! 230: of
! 231: .Ar system-name ,
1.6 aaron 232: .Nm
1.14 ! krw 233: searches for a system description with a name identical to
! 234: .Ar system-name .
! 235: The search order is
! 236: .Bl -enum -offset indent
! 237: .It
! 238: If the environment variable
! 239: .Ev REMOTE
! 240: does not start with a
! 241: .Ql \&/
! 242: it is assumed to be a system description, and is considered first.
! 243: .It
! 244: If the environment variable
! 245: .Ev REMOTE
! 246: begins with a
! 247: .Ql \&/
! 248: it is assumed to be a path to a
! 249: .Xr remote 5
! 250: database, and the specified database is searched.
! 251: .It
! 252: The default
1.7 aaron 253: .Xr remote 5
1.14 ! krw 254: database,
! 255: .Pa /etc/remote ,
! 256: is searched.
! 257: .El
! 258: .Pp
! 259: See
! 260: .Xr remote 5
! 261: for full documentation on system descriptions.
! 262: .Pp
! 263: The
! 264: .Ar ba
! 265: capability is used in system descriptions to specify the baud rate
! 266: with which to establish a connection.
! 267: If the value specified is not suitable, the baud rate to be used may
! 268: be given on the command line, e.g.,
1.1 deraadt 269: .Ql "tip -300 mds" .
270: .Pp
271: When
1.6 aaron 272: .Nm
1.14 ! krw 273: establishes a connection it sends out the connection message
! 274: specified in the
! 275: .Ar cm
! 276: capability of the system description being used.
1.1 deraadt 277: .Pp
278: When
1.6 aaron 279: .Nm
1.14 ! krw 280: prompts for an argument (e.g., during setup of a file transfer) the
! 281: line typed may be edited with the standard erase and kill characters.
! 282: A null line in response to a prompt, or an interrupt, will abort the
! 283: dialogue and return you to the remote machine.
1.1 deraadt 284: .Pp
1.6 aaron 285: .Nm
1.14 ! krw 286: guards against multiple users connecting to a remote system by opening
! 287: modems and terminal lines with exclusive access, and by honoring the
! 288: locking protocol used by
1.1 deraadt 289: .Xr uucico 8 .
290: .Pp
291: During file transfers
1.6 aaron 292: .Nm
1.1 deraadt 293: provides a running count of the number of lines transferred.
1.6 aaron 294: When using the
295: .Ic ~>
296: and
297: .Ic ~<
298: commands, the
299: .Dq eofread
300: and
301: .Dq eofwrite
1.14 ! krw 302: variables are used to recognize end-of-file when reading, and specify
! 303: end-of-file when writing (see below).
1.7 aaron 304: File transfers normally depend on tandem mode for flow control.
305: If the remote system does not support tandem mode,
1.6 aaron 306: .Dq echocheck
307: may be set to indicate
308: .Nm
1.1 deraadt 309: should synchronize with the remote system on the echo of each
310: transmitted character.
311: .Pp
312: When
1.6 aaron 313: .Nm
1.14 ! krw 314: must dial a phone number to connect to a system it will print various
! 315: messages indicating its actions.
1.6 aaron 316: .Nm
1.14 ! krw 317: supports a variety of auto-call units and modems with the
! 318: .Ar at
! 319: capability in system descriptions.
! 320: .Pp
! 321: Support for Ventel 212+ (ventel), Hayes AT-style (hayes),
! 322: USRobotics Courier (courier), Telebit T3000 (t3000) and
! 323: Racal-Vadic 831 (vadic) units is enabled by default.
! 324: .Pp
! 325: Support for Bizcomp 1031[fw] (biz31[fw]), Bizcomp 1022[fw]
! 326: (biz22[fw]), DEC DF0[23]-AC (df0[23]), DEC DN-11 (dn11) and
! 327: Racal-Vadic 3451 (v3451) units can be added by recompiling
! 328: .Xr tip 1
! 329: with the appropriate defines.
! 330: .Pp
! 331: Note that if support for both the Racal-Vadic 831 and 3451 is enabled
! 332: they are referred to as the v831 and v3451 respectively.
! 333: If only one of the two is supported, it is referred to as vadic.
1.1 deraadt 334: .Ss VARIABLES
1.6 aaron 335: .Nm
1.14 ! krw 336: maintains a set of variables which control its operation.
1.1 deraadt 337: Some of these variables are read-only to normal users (root is allowed
1.7 aaron 338: to change anything of interest).
339: Variables may be displayed and set through the
1.6 aaron 340: .Sq s
1.7 aaron 341: escape.
342: The syntax for variables is patterned after
1.6 aaron 343: .Xr vi 1
1.1 deraadt 344: and
1.6 aaron 345: .Xr Mail 1 .
346: Supplying
347: .Dq all
1.1 deraadt 348: as an argument to the set command displays all variables readable by
1.7 aaron 349: the user.
1.14 ! krw 350: Alternatively, the user may request display of a particular variable
! 351: by attaching a
1.6 aaron 352: .Ql ?
1.7 aaron 353: to the end.
354: For example,
1.6 aaron 355: .Dq escape?
1.1 deraadt 356: displays the current escape character.
357: .Pp
1.7 aaron 358: Variables are numeric, string, character, or boolean values.
1.14 ! krw 359: Boolean variables are set merely by specifying their name; they may be
! 360: reset by prepending a
1.6 aaron 361: .Ql !
1.7 aaron 362: to the name.
363: Other variable types are set by concatenating an
1.6 aaron 364: .Ql =
1.7 aaron 365: and the value.
366: The entire assignment must not have any blanks in it.
1.14 ! krw 367: A single set command may be used to interrogate as well as set a
! 368: number of variables.
1.1 deraadt 369: Variables may be initialized at run time by placing set commands
1.6 aaron 370: (without the
371: .Ql ~s
372: prefix in a file
1.1 deraadt 373: .Pa .tiprc
1.7 aaron 374: in one's home directory).
375: The
1.1 deraadt 376: .Fl v
377: option causes
1.6 aaron 378: .Nm
1.1 deraadt 379: to display the sets as they are made.
380: Certain common variables have abbreviations.
1.14 ! krw 381: The following is a list of common variables, their abbreviations, and
! 382: their default values:
1.1 deraadt 383: .Bl -tag -width Ar
384: .It Ar beautify
1.14 ! krw 385: (bool) Discard unprintable characters when a session is being
! 386: scripted; abbreviated
1.4 aaron 387: .Ar be .
1.1 deraadt 388: .It Ar baudrate
389: (num) The baud rate at which the connection was established;
390: abbreviated
1.4 aaron 391: .Ar ba .
1.1 deraadt 392: .It Ar dialtimeout
1.14 ! krw 393: (num) When dialing a phone number, the time (in seconds) to wait for a
! 394: connection to be established; abbreviated
1.4 aaron 395: .Ar dial .
1.1 deraadt 396: .It Ar echocheck
397: (bool) Synchronize with the remote host during file transfer by
398: waiting for the echo of the last character transmitted; default is
1.4 aaron 399: .Ar off .
1.1 deraadt 400: .It Ar eofread
401: (str) The set of characters which signify an end-of-transmission
1.6 aaron 402: during a
403: .Ic ~<
404: file transfer command; abbreviated
1.4 aaron 405: .Ar eofr .
1.1 deraadt 406: .It Ar eofwrite
1.6 aaron 407: (str) The string sent to indicate end-of-transmission during a
408: .Ic ~>
409: file transfer command; abbreviated
1.4 aaron 410: .Ar eofw .
1.1 deraadt 411: .It Ar eol
412: (str) The set of characters which indicate an end-of-line.
1.6 aaron 413: .Nm
1.1 deraadt 414: will recognize escape characters only after an end-of-line.
415: .It Ar escape
416: (char) The command prefix (escape) character; abbreviated
1.6 aaron 417: .Ar es ;
418: default value is
419: .Ql ~ .
1.1 deraadt 420: .It Ar exceptions
1.14 ! krw 421: (str) The set of characters which should not be discarded due to the
! 422: beautification switch; abbreviated
1.7 aaron 423: .Ar ex ;
1.6 aaron 424: default value is
425: .Dq \et\en\ef\eb .
1.1 deraadt 426: .It Ar force
427: (char) The character used to force literal data transmission;
428: abbreviated
1.7 aaron 429: .Ar fo ;
1.6 aaron 430: default value is
431: .Ql ^P .
1.1 deraadt 432: .It Ar framesize
1.11 millert 433: (num) The amount of data (in bytes) to buffer between filesystem
1.1 deraadt 434: writes when receiving files; abbreviated
1.4 aaron 435: .Ar fr .
1.1 deraadt 436: .It Ar host
437: (str) The name of the host to which you are connected; abbreviated
1.4 aaron 438: .Ar ho .
1.1 deraadt 439: .It Ar prompt
440: (char) The character which indicates an end-of-line on the remote
441: host; abbreviated
1.6 aaron 442: .Ar pr ;
443: default value is
444: .Ql \en .
1.7 aaron 445: This value is used to synchronize during data transfers.
1.14 ! krw 446: The count of lines transferred during a file transfer command is based
! 447: on receipt of this character.
1.1 deraadt 448: .It Ar raise
449: (bool) Upper case mapping mode; abbreviated
1.6 aaron 450: .Ar ra ;
1.1 deraadt 451: default value is
1.4 aaron 452: .Ar off .
1.11 millert 453: When this mode is enabled, all lowercase letters will be mapped to
454: uppercase by
1.6 aaron 455: .Nm
1.1 deraadt 456: for transmission to the remote machine.
457: .It Ar raisechar
1.11 millert 458: (char) The input character used to toggle uppercase mapping mode;
1.1 deraadt 459: abbreviated
1.6 aaron 460: .Ar rc ;
461: default value is
462: .Ql ^A .
1.1 deraadt 463: .It Ar record
464: (str) The name of the file in which a session script is recorded;
465: abbreviated
1.6 aaron 466: .Ar rec ;
467: default value is
468: .Dq tip.record .
1.1 deraadt 469: .It Ar script
470: (bool) Session scripting mode; abbreviated
1.7 aaron 471: .Ar sc ;
1.1 deraadt 472: default is
1.4 aaron 473: .Ar off .
1.1 deraadt 474: When
475: .Ar script
476: is
1.8 aaron 477: .Li true ,
1.6 aaron 478: .Nm
1.14 ! krw 479: will record everything transmitted by the remote machine in the script
! 480: record file specified in
1.4 aaron 481: .Ar record .
1.1 deraadt 482: If the
483: .Ar beautify
484: switch is on, only printable
485: .Tn ASCII
1.14 ! krw 486: characters will be included in the script file (those characters
! 487: between 040 and 0177).
1.7 aaron 488: The variable
1.1 deraadt 489: .Ar exceptions
490: is used to indicate characters which are an exception to the normal
491: beautification rules.
492: .It Ar tabexpand
493: (bool) Expand tabs to spaces during file transfers; abbreviated
1.7 aaron 494: .Ar tab ;
1.1 deraadt 495: default value is
1.4 aaron 496: .Ar false .
1.1 deraadt 497: Each tab is expanded to 8 spaces.
498: .It Ar verbose
499: (bool) Verbose mode; abbreviated
1.7 aaron 500: .Ar verb ;
1.1 deraadt 501: default is
1.4 aaron 502: .Ar true .
1.1 deraadt 503: When verbose mode is enabled,
1.6 aaron 504: .Nm
1.14 ! krw 505: prints messages while dialing, shows the current number of lines
! 506: transferred during a file transfer operations, and more.
1.1 deraadt 507: .El
508: .Sh ENVIRONMENT
509: .Bl -tag -width Fl
510: .It Ev SHELL
1.14 ! krw 511: The name of the shell to use for the
1.6 aaron 512: .Ic ~!
513: command; default value is
1.14 ! krw 514: .Dq /bin/sh .
1.1 deraadt 515: .It Ev HOME
1.14 ! krw 516: The home directory to use for the
1.6 aaron 517: .Ic ~c
1.14 ! krw 518: command.
1.1 deraadt 519: .It Ev HOST
1.14 ! krw 520: The default value for
! 521: .Ar system-name
! 522: if none is specified via the command line.
! 523: .It Ev REMOTE
! 524: A system description, or an absolute path to a
! 525: .Xr remote 5
! 526: system description database.
! 527: .It Ev PHONES
! 528: A path to a
! 529: .Xr phones 5
! 530: database.
1.1 deraadt 531: .El
532: .Sh FILES
1.14 ! krw 533: .Bl -tag -width "/var/spool/lock/LCK..*" -compact
1.1 deraadt 534: .It Pa /etc/remote
1.14 ! krw 535: global
! 536: .Xr remote 5
! 537: database
1.1 deraadt 538: .It Pa /etc/phones
1.14 ! krw 539: default
! 540: .Xr phones 5
! 541: file
1.4 aaron 542: .It Pa ~/.tiprc
543: initialization file
1.1 deraadt 544: .It Pa tip.record
1.4 aaron 545: record file
546: .It Pa /var/log/aculog
547: line access log
1.1 deraadt 548: .It Pa /var/spool/lock/LCK..*
1.4 aaron 549: lock file to avoid conflicts with
550: .Xr uucp
1.1 deraadt 551: .El
552: .Sh SEE ALSO
1.4 aaron 553: .Xr phones 5 ,
554: .Xr remote 5
1.1 deraadt 555: .Sh HISTORY
556: The
1.6 aaron 557: .Nm
1.1 deraadt 558: appeared command in
559: .Bx 4.2 .
560: .Sh BUGS
561: The full set of variables is undocumented and should, probably, be
562: pared down.