Temporarily use -O1 until segfault with -O2+krb5+iksd is fixed
[ckermit.git] / ckuker.nr
1 .\" @(#) kermit.1 8.0.211 2011/06/07 Columbia University
2 .TH KERMIT 1 "JUNE 2011" "User Manuals"
3 .na
4 .SH NAME
5 kermit \-
6 .B C\(hyKermit 9.0:
7 transport\(hy and platform\(hyindependent
8 interactive and scriptable communications software.
9 .IP
10
11 This document is intended to give the beginner sufficient information to
12 make basic (if not advanced) use of C\(hyKermit 9.0.  Although it might be
13 rather long for a Unix manual page, it's still far shorter than the
14 C\(hyKermit manual, which should be consulted for advanced topics such as
15 customization, character\(hysets, scripting, etc. We also attempt to provide
16 a clear structural overview of C\(hyKermit's many capabilities, functional
17 areas, states, and modes and their interrelation, that should be helpful to
18 beginners and veterans alike, as well as to those upgrading to version 9.0
19 from earlier releases.
20 .PP
21 This document is also available as a Web page at:
22 .IP
23 http://www.columbia.edu/kermit/ckututor.html
24 .SH DESCRIPTION
25 C\(hyKermit is an all\(hypurpose communications software package from the Kermit
26 Project at Columbia University that:
27 .PP
28 .nf
29 \(bu    Is portable to many platforms, Unix and non\(hyUnix alike.
30 .br
31 \(bu    Can make both serial and network connections.
32 .br
33 \(bu    Can conduct interactive terminal sessions over its connection.
34 .br
35 \(bu    Can transfer text or binary files over the same connection.
36 .br
37 \(bu    Can convert character sets in the terminal session.
38 .br
39 \(bu    Can convert character sets during text\(hyfile file transfer.
40 .br
41 \(bu    Is customizable in every aspect of its operation.
42 .fi
43 .PP
44 C\(hyKermit is a modem program, a Telnet client, an Rlogin client, an FTP
45 client, an HTTP client, and on selected platforms, also an X.25 client. It
46 can make its own secure Internet connections using IETF\(hyapproved security
47 methods including Kerberos IV, Kerberos V, SSL/TLS, and SRP and it can also
48 make SSH connections through your external SSH client application. It can
49 be the far\(hyend file\(hytransfer or client/server partner of your desktop
50 Kermit client. It can also accept incoming dialed and network connections.
51 It can even be installed as an Internet service on its own standard TCP
52 socket, 1649 [RFC2839, RFC2840].
53 .PP
54 And perhaps most important, everything you can do "by hand" (interactively)
55 with C\(hyKermit, can be "scripted" (automated) using its built\(hyin
56 cross\(hyplatform transport\(hyindependent script programming language, which
57 happens to be identical to its interactive command language.
58 .PP
59 This manual page offers an overview of C\(hyKermit 9.0 for Unix ("Unix" is an
60 operating system family that includes AIX, DG/UX, FreeBSD, HP\(hyUX, IRIX,
61 Linux, Mac OS X, NetBSD, OpenBSD, Open Server, Open Unix, QNX, Solaris,
62 SunOS, System V R3, System V R4, Tru64 Unix, Unixware, Xenix, and many
63 others). For thorough coverage, please consult the published C\(hyKermit
64 manual and supplements (see DOCUMENTATION below). For further information
65 about C\(hyKermit, Kermit software for other platforms, and Kermit manuals,
66 visit the Kermit Project website:
67 .PP
68   http://www.columbia.edu/kermit/
69 .PP
70 This is a longer\(hythan\(hyaverage manual page, and yet it barely scratches the
71 surface. Don't be daunted. C\(hyKermit is a large and complex package,
72 evolving over decades of practice and experience, but that doesn't mean
73 it's hard to learn or use. Its most commonly used functions are explained
74 here with pointers to additional information elsewhere.
75 .SH SYNOPSIS
76 .B kermit [
77 .I filename
78 .B ] [
79 .I options
80 .B ] [ {=,\-\-,+}
81 .I text
82 .B ] ]
83 .PP
84 or:
85 .PP
86 .B kermit 
87 .I URL
88 .PP
89 If the first command\(hyline argument is the name of a file, interactive\(hymode
90 commands are executed from the file. The '=' (or "\-\-") argument tells
91 Kermit not to parse the remainder of the command line, but to make the
92 words following '=' available as \e%1, \e%2, ... \e%9. The "+" argument is
93 like "=" but for use in "kerbang scripts" (explained below). A second
94 command\(hyline format allows the one and only argument to be a Telnet, FTP,
95 HTTP, or IKSD URL.
96 .PP
97 Order of execution:
98 .TP
99  1.
100 The command file (if any).
101 .TP
102 .nf
103  2.
104 The initialization file, if any, unless suppressed with \-Y.
105 .fi
106 .TP
107  3.
108 The customization file (if it is executed by the initialization file).
109 .TP
110  4.
111 The command\(hyline URL (if any, and if so, execution stops here).
112 .TP
113  5.
114 Command\(hyline options (if any).
115 .TP
116  6.
117 Interactive commands.
118 .PP
119 Some command\(hyline options can cause actions (such as \-s to send a file);
120 others just set parameters. If any action options are included on the
121 command line, Kermit exits when finished unless also given the \-S ("stay")
122 option. If no action options are given, no initialization or command files
123 contained an EXIT or QUIT command, and no fatal errors occurred, Kermit
124 issues its prompt and waits for you to type commands.
125 .IP
126 Bear in mind that C\(hyKermit can be built with selected features
127 disabled, and also that certain features are not available on all
128 platforms. For example, C\(hyKermit can't be built with TCP/IP
129 support on a platform that does not have TCP/IP header files and
130 libraries (and even if Kermit does include TCP/IP support, it
131 can't be used to make TCP/IP connections on a computer that does
132 not have a TCP/IP stack installed). If your version of 
133 C\(hyKermit lacks a feature mentioned here, use its SHOW FEATURES command to
134 see what might have been excluded.
135 .PP
136 C\(hyKermit has three kinds of commands: regular single\(hyletter command\(hyline
137 options, extended\(hyformat command\(hyline options, and interactive commands.
138 .PP
139 Like most Unix commands, C\(hyKermit can be be given options on the command
140 line. But C\(hyKermit also can be used interactively by giving it commands
141 composed of words, which are more intuitive than cryptic command\(hyline
142 options, and more flexible too. In other words, you don't have to use
143 C\(hyKermit's command\(hyline options, but they are available if you want to. (By
144 the same token, you don't have to use its interactive commands either \(hy\(hy
145 you can use either or both in any combination.)
146 .PP
147 C\(hyKermit is generally installed in the PATH as "kermit", and therefore is
148 invoked by typing the word "kermit" (lowercase) at the shell prompt, and
149 then pressing the Return or Enter key. If you wish to include command\(hyline
150 options, put them after the word "kermit" but before pressing Return or
151 Enter, separated by spaces, for example:
152 .PP
153   $ kermit \-s ckermit.tar.gz
154 .PP
155 ('$' is the shell prompt; "kermit \-s ckermit.tar.gz" is what you type,
156 followed by Return or Enter.)
157 .SH OPTIONS
158 Here is a list of C\(hyKermit's single\(hyletter command\(hyline options, which
159 start with a single dash (\-), in ASCII ("alphabetical") order. Alphabetic
160 case is significant (\-A is not the same as \-a).  Action options are 
161 tagged "ACTION".
162 .TP
163 \-0
164 (digit zero)  100% transparent Connect state for
165 "in\(hythe\(hymiddle" operation: 8 bits, no parity, no
166 escape character, everything passes through.
167 .TP
168 \-8
169 (digit eight)  Connection is 8\(hybit clean (this is the
170 default in C\(hyKermit 8.0 and later). Equivalent to the EIGHTBIT
171 command, which in turn is a shortcut for SET TERMINAL
172 BYTESIZE 8, SET COMMAND BYTESIZE 8, SET PARITY NONE.
173 .TP
174 \-9 arg
175 (digit nine)  Make a connection to an FTP server.
176 Equivalent to the FTP OPEN command.
177 Argument: IP\(hyaddress\(hyor\(hyhostname[:optional\(hyTCP\(hyport].
178 NOTE: C\(hyKermit also has a separate FTP command\(hyline
179 personality, with regular FTP\(hylike command\(hyline
180 syntax. More about this below.
181 .TP
182 \-A
183 Kermit is to be started as an Internet service (IKSD)
184 (only from inetd.conf).
185 .TP
186 \-B
187 Kermit is running in Batch or Background (no
188 controlling terminal). To be used in case Kermit
189 doesn't automatically sense its background status.
190 Equivalent to the SET BACKGROUND ON command.
191 .TP
192 \-C arg
193 Interactive\(hymode Commands to be executed.
194 Argument: Commands separated by commas, list in
195 doublequotes.
196 .TP
197 \-D arg
198 Delay before starting to send in Remote mode.
199 Equivalent to the SET DELAY command.
200 Argument: Number of seconds.
201 .TP
202 \-E
203 Exit automatically when connection closes. Equivalent
204 to SET EXIT ON\-DISCONNECT ON.
205 .TP
206 \-F arg
207 Use an open TCP connection.
208 Argument: Numeric file descriptor of open TCP
209 connection.
210 Also see: \-j, \-J.
211 .TP
212 \-G arg
213 (ACTION) Get file(s) from server, send contents to standard
214 output, which normally would be piped to another
215 process.
216 Argument: Remote file specification, in quotes if it
217 contains metacharacters.
218 Also see: \-g, \-k.
219 .TP
220 \-H
221 Suppress program startup Herald and greeting.
222 .TP
223 \-I
224 Tell Kermit it has a reliable connection, to force streaming to be used where
225 it normally would not be.  Equivalent to the SET RELIABLE ON command.
226 .TP
227 \-J arg
228 (ACTION) "Be like Telnet." Like \-j but implies \-E.  Argument: IP
229 hostname/address optionally followed by service.  NOTE: C\(hyKermit also has a
230 separate Telnet command\(hyline personality, with regular Telnet\(hylike
231 command\(hyline syntax. More about this below.
232 .TP
233 \-L
234 Recursive directory descent for files in \-s option.
235 .TP
236 \-M arg
237 My user name (for use with Telnet, Rlogin, FTP, etc).
238 Equivalent to the SET LOGIN USER command.
239 Argument: Username string.
240 .TP
241 \-O
242 (ACTION) (Uppercase letter O) Be a server for One command only.
243 Also see: \-x.
244 .TP
245 \-P
246 Don't convert file (Path) names of transferred files.
247 Equivalent to SET FILE NAMES LITERAL.
248 .TP
249 \-Q
250 Quick Kermit protocol settings. Equivalent to the FAST
251 command. This is the default in C\(hyKermit 7.0 and later.
252 .TP
253 \-R
254 Remote\(hyonly (this just makes IF REMOTE true).
255 .TP
256 \-S
257 Stay (enter command parser after action options).
258 .TP
259 \-T
260 Force Text mode for file transfer; implies \-V.
261 Equivalent to SET TRANSFER MODE MANUAL, SET FILE TYPE TEXT.
262 .TP
263 \-V
264 Disable automatic per\(hyfile text/binary switching.
265 Equivalent to SET TRANSFER MODE MANUAL.
266 .TP
267 \-Y
268 Skip (don't execute) the initialization file.
269 .TP
270 \-a arg
271 As\(hyname for file(s) in \-s, \-r, or \-g.
272 Argument: As\(hyname string (alternative filename). When
273 receiving files, this can be a directory name.
274 .TP
275 \-b arg
276 Speed for serial device. Equivalent to SET SPEED.
277 Argument: Numeric Bits per second for serial
278 connections.
279 .TP
280 \-c
281 (ACTION) Enter Connect state before transferring files.
282 .TP
283 \-d
284 Create a debug.log file with detailed debugging
285 information (a second \-d adds timestamps). Equivalent
286 to LOG DEBUG but takes effect sooner.
287 .TP
288 \-e arg
289 Maximum length for incoming Kermit file\(hytransfer
290 packets. Equivalent to SET RECEIVE PACKET\-LENGTH.
291 Argument: Length in bytes.
292 .TP
293 \-f
294 (ACTION) Send a FINISH command to a Kermit server.
295 .TP
296 \-g arg
297 Get file(s) from a Kermit server.
298 Argument: File specification on other computer, in
299 quotes if it contains metacharacters. Equivalent to
300 GET. Also see: \-a, \-G, \-r.
301 .TP
302 \-h
303 (ACTION) Print Help text for single\(hyletter command\(hyline options
304 (pipe thru 'more' to prevent scrolling).
305 .TP
306 \-i
307 Force binary (Image) mode for file transfer; implies
308 \-V. Equivalent to SET TRANSFER MODE MANUAL, SET FILE
309 TYPE BINARY.
310 .TP
311 \-j arg
312 Make a TCP/IP connection.
313 Argument: IP host name/address and optional service
314 name or number. Equivalent to the TELNET command.
315 Also see: \-J, \-F.
316 .TP
317 \-k
318 (ACTION) Receive file(s) to standard output, which normally 
319 would be piped to another process.
320 Also see: \-r, \-G.
321 .TP
322 \-l arg
323 (Lowercase letter L) Make a connection on the given
324 serial communications device. Equivalent to the SET
325 LINE (SET PORT) command.
326 Argument: Serial device name, e.g. /dev/ttyS0.
327 .TP
328 \-m arg
329 Modem type for use with the \-l device. Equivalent to
330 the SET MODEM TYPE command.
331 Argument: Modem name as in SET MODEM TYPE command,
332 e.g. "usrobotics".
333 .TP
334 \-n
335 (ACTION) Enter Connect state after transferring files (historical).
336 .TP
337 \-p arg
338 Parity. Equivalent to the SET PARITY command.
339 Argument: One of the following: e(ven), o(dd), m(ark),
340 n(one), s(pace).
341 .TP
342 \-q
343 Quiet (suppress most messages). Equivalent to SET QUIET ON.
344 .TP
345 \-r
346 (ACTION) Receive file(s). Equivalent to the RECEIVE command.
347 Argument: (none, but see \-a)
348 .TP
349 \-s arg
350 Send file(s).
351 Argument: One or more local file specifications.
352 Equivalent to the SEND command.
353 Also see: \-a.
354 .TP
355 \-t
356 (Historical) Xon (Ctrl\-Q) Turnaround character for
357 half\(hyduplex connections (used on serial linemode
358 connections to old mainframes). Equivalent to SET
359 DUPLEX HALF, SET HANDSHAKE XON.
360 .TP
361 \-v arg
362 Window size for Kermit protocol (ignored when
363 streaming). Equivalanet to SET WINDOW\-SIZE.
364 Argument: Number, 1 to 32.
365 .TP
366 \-w
367 Incoming files Write over existing files. Equivalent
368 to SET FILE COLLISION OVERWRITE.
369 .TP
370 \-x
371 (ACTION) Enter server mode. Equivalent to the SERVER command.
372 Also see: \-O.
373 .TP
374 \-y arg
375 Alternative initialization file.
376 Argument: Filename.
377 .TP
378 \-z
379 Force foreground behavior. To be used in case Kermit
380 doesn't automatically sense its foreground status.
381 Equivalent to the SET BACKGROUND OFF command.
382 .PP
383 Extended command\(hyline options (necessary because single\(hyletter ones are
384 about used up) start with two dashes (\-\-), with words rather than single
385 letters as option names. If an extended option takes an argument, it is
386 separated from the option word by a colon (:). Extended options include:
387
388 .TP
389  \-\-bannerfile:filename
390 File to display upon startup or IKSD login.
391 .TP
392  \-\-cdfile:filename
393 File to be sent for display to the client when
394 server changes directory (filename is relative to
395 the changed\(hyto directory).
396 .TP
397  \-\-cdmessage:{on,off}
398 Enable/disable the server CD message feature.
399 .TP
400  \-\-help
401 Prints usage message for extended options.
402 .TP
403  \-\-helpfile:filename
404 Designates a file containing custom text to
405 replace the top\(hylevel HELP command.
406 .TP
407  \-\-nointerrupts
408 Disables keyboard interrupts.
409 .TP
410  \-\-noperms
411 Disables the Kermit protocol file Permissions
412 attribute, to prevent transmission of file
413 permissions (protection) from sender to receiver.
414 .TP
415  \-\-version
416 (ACTION) C\(hyKermit prints its version number.
417 .PP
418 Plus several other IKSD\(hyOnly options described at:
419 .PP
420   http://www.columbia.edu/kermit/iksd.html
421 .PP
422 See the file\(hytransfer section for examples of command\(hyline invocation.
423 .SH COMMAND LANGUAGE
424 C\(hyKermit's interactive command language is the subject of a 622\(hypage book
425 and another several hundred pages of updates, far too much for a manual
426 page. But it's not hard to get started. At the shell prompt, just type
427 "kermit" to get C\(hyKermit's interactive command prompt:
428 .PP
429 .nf
430   $ kermit
431   (/current/directory) C\-Kermit>
432 .fi
433 .PP
434 Begin by typing "help" (and then press the Return or Enter key) for a
435 top\(hylevel overview, read it, and go from there. Your second command should
436 probably be "intro" (introduction). Note the prompt shows your current
437 directory (unless you tell Kermit to prompt you with something else).
438 .PP
439 Interactive commands are composed mainly of regular English words, usually
440 in the form of imperative sentences, such as:
441 .PP
442   send oofa.txt
443 .PP
444 which tells Kermit to send (transfer) the file whose name is oofa.txt, or:
445 .PP
446   set transfer mode automatic
447 .PP
448 which sets Kermit's "transfer mode" to "automatic" (whatever that means).
449 .PP
450 While typing commands, you can abbreviate, ask for help (by pressing the
451 "?" key anywhere in a command), complete keywords or filenames (with the
452 Tab or Esc key), and edit your typing with Backspace or Delete, Ctrl\-W,
453 Ctrl\-U, etc. You can also recall previous commands, save your command
454 history, and who knows what else. Give the INTRO command for details.
455 .PP
456 C\(hyKermit has hundreds of commands, and they can be issued in infinite
457 variety and combinations, including commands for:
458 .nf
459 .PP
460 \(bu    Making connections (SET LINE, DIAL, TELNET, SSH, FTP, ...)
461 .br
462 \(bu    Breaking connections (HANGUP, CLOSE)
463 .br
464 \(bu    Transferring files (SEND, GET, RECEIVE, MOVE, RESEND, ...)
465 .br
466 \(bu    Establishing preferences (SET)
467 .br
468 \(bu    Displaying preferences (SHOW)
469 .br
470 \(bu    Managing local files (CD, DELETE, MKDIR, DIR, RENAME, TYPE, ...)
471 .br
472 \(bu    Managing remote files (RCD, RDEL, RMKDIR, RDIR, ...)
473 .br
474 \(bu    Using local files (FOPEN, FCLOSE, FREAD, FWRITE)
475 .br
476 \(bu    Programming (TAKE, DEFINE, IF, FOR, WHILE, SWITCH, DECLARE, ...)
477 .br
478 \(bu    Interacting with the user (ECHO, ASK, ...)
479 .br
480 \(bu    Interacting with a remote computer (INPUT, OUTPUT, ...)
481 .br
482 \(bu    Interacting with local programs (RUN, EXEC, PTY, ...)
483 .br
484 \(bu    Logging things (LOG SESSION, LOG PACKETS, LOG DEBUG, ...)
485 .PP
486 .fi
487 And of course QUIT or EXIT to get out and HELP to get help, and for
488 programmers: loops, decision making, variables, arrays, associative arrays,
489 integer and floating point arithmetic, macros, built\(hyin and user\(hydefined
490 functions, string manipulation, pattern matching, block structure, scoping,
491 recursion, and all the rest. To get a list of all C\(hyKermit's commands, type
492 a question mark (?) at the prompt. To get a description of any command,
493 type HELP followed by the name of the command, for example:
494 .PP
495   help send
496 .PP
497 The command interruption character is Ctrl\-C (hold down the Ctrl key and
498 press the C key).
499 .PP
500 The command language "escape character", used to introduce variable names,
501 function invocations, and so on, is backslash (\). If you need to include a
502 literal backslash in a command, type two of them, e.g.:
503 .PP
504   get c:\ek95\ek95custom.ini
505 .SS Command Files, Macros, and Scripts
506 A file containing Kermit commands is called a Kermit command file or Kermit
507 script. It can be executed with Kermit's TAKE command:
508 .PP
509   (/current/dir) C\-Kermit> take commandfile
510 .PP
511 (where "commandfile" is the name of the command file). Please don't pipe a
512 command file into Kermit's standard input (which might or might not work);
513 if you have Kermit commands in a file, tell Kermit to TAKE the file.
514 .PP
515 In Unix only, a Kermit command file can also be executed directly by
516 including a "kerbang" line as the first line of the file:
517 .PP
518   #!/usr/local/bin/kermit +
519 .PP
520 That is, a top line that starts with "#!", followed immediately by the full
521 path of the Kermit executable, and then, if the Kermit script is to be
522 given arguments on the command line, a space and a plus sign. The script
523 file must also have execute permission:
524 .PP
525   chmod +x commandfile
526 .PP
527 Except for the " +" part, this is exactly the same as you would do for a
528 shell script, a Perl script, etc. Here's a simple but useless example
529 script that regurgitates its arguments (up to three of them):
530 .PP
531   #!/usr/local/bin/kermit +
532   if defined \e%1 echo "Argument 1: \e%1"
533   if defined \e%2 echo "Argument 2: \e%2"
534   if defined \e%3 echo "Argument 3: \e%3"
535   if defined \e%4 echo "etc..."
536   exit
537 .PP
538 If this file is stored in your current directory as "commandfile", then:
539 .PP
540   ./commandfile one two three four five
541 .PP
542 prints:
543 .PP
544   Argument 1: one
545   Argument 2: two
546   Argument 3: three
547   etc...
548 .PP
549 This illustrates the basic structure of a standalone Kermit script: the
550 "kerbang line", then some commands. It should end with "exit" unless you
551 want the Kermit prompt to appear when it is finished. \e%1 is the first
552 argument, \e%2 the second, and so on.
553 .PP
554 You can also create your own commands by defining named macros composed of
555 other Kermit commands (or macros). For example:
556 .PP
557 .nf
558   define mydelete {
559       local trash
560       assign trash \ev(home)trashcan/
561       if not defined \e%1 end 1 "Delete what?"
562       if wild \e%1 {
563           end 1 "Deleting multiple files is too scary"
564       }
565       if not exist \e%1 end 1 "I can't find \e%1"
566       if not directory \em(trash) {
567           mkdir \em(trash)
568           if fail end 1 "No trash can"
569       }
570       rename /list \e%1 \em(trash)
571   }
572   define myundelete {
573       local trash
574       assign trash \ev(home)trashcan/
575       if not defined \e%1 end 1 "Undelete what?"
576       if wild \e%1 {
577           end 1 "Undeleting multiple files is too hard"
578       }
579       if not directory \em(trash) end 1 "No trash can"
580       if not exist \em(trash)\e%1 {
581           end 1 "I can't find \e%1 in trash can"
582       }
583       rename /list \em(trash)\e%1 .
584   }
585 .PP
586 .fi
587 These sample macros are not exactly production quality (they don't handle
588 filenames that include path segments, they don't handle multiple files,
589 etc), but you get the idea: you can pass arguments to macros, and they can
590 check them and make other kinds of decisions. If you put the above lines
591 into your initialization or customization file (explained below), you'll
592 have MYDELETE and MYUNDELETE commands available every time you start
593 Kermit, at least as long as you don't suppress execution of the
594 initialization file. (Exercise for the reader: Make these macros generally
595 useful: remove limitations, add trashcan display, browsing, emptying, etc.)
596 .PP
597 Kerbang scripts execute without the initialization file. This to keep them
598 portable and also to make them start faster. If you want to write Kerbang
599 scripts that depend on the initialization file, include the command
600 .PP
601   take \ev(home).kermrc
602 .PP
603 at the desired spot in the script. By the way, \ev(xxx) is a built\(hyin
604 variable (xxx is the variable name, "home" in this case). To see what
605 built\(hyin variables are available, type "show variables" at the C\(hyKermit
606 prompt. To see what else you can show, type "show ?". \em(xxx) is a user
607 defined variable (strictly speaking, it is a macro used as a variable).
608 .SS Command List
609 C\(hyKermit has more than 200 top\(hylevel commands, and some of these, such as
610 SET, branch off into hundreds of subcommands of their own, so it's not
611 practical to describe them all here. Instead, here's a concise list of the
612 most commonly used top\(hylevel commands, grouped by category. To learn about
613 each command, type "help" followed by the command name, e.g. "help set".
614 Terms such as Command state and Connect state are explained in subsequent
615 sections.
616 .PP
617 Optional fields are shown in [ brackets ].  "filename" means the
618 name of a single file. filespec means a file specification that is allowed
619 to contain wildcard characters like '*' to match groups of files. options
620 are (optional) switches like /PAGE, /NOPAGE, /QUIET, etc, listed in the
621 HELP text for each command. Example:
622 .PP
623 .nf
624   send /recursive /larger:10000 /after:\-1week /except:*.txt *
625 .fi
626 .PP
627 which can be read as "send all the files in this directory and all the ones
628 underneath it that are larger than 10000 bytes, no more than one week old,
629 and whose names don't end with ".txt".
630 .SS
631 Basic Commands
632 .RS
633 .TP
634 HELP
635 Requests top\(hylevel help.
636 .TP
637 HELP command
638 Requests help about the given command.
639 .TP
640 INTRODUCTION
641 Requests a brief introduction to C\(hyKermit.
642 .TP
643 LICENSE
644 Displays the C\(hyKermit software copyright and license.
645 .TP
646 VERSION
647 Displays C\(hyKermit's version number.
648 .TP
649 EXIT [ number ]
650 Exits from Kermit with the given
651 status code. Synonyms: QUIT, E, Q.
652 .TP
653 TAKE filename [ parameters... ]
654 Executes commands from the given
655 .TP
656 LOG item [ filename ]
657 Keeps a log of the given item in the given file.
658 .TP
659 [ DO ] macro [ parameters... ]
660 Executes commands from the given macro.
661 .TP
662 SET parameter value
663 Sets the given parameter to the given value.
664 .TP
665 SHOW category
666 Shows settings in a given category.
667 .TP
668 STATUS
669 Tells whether previous command succeeded or failed.
670 .TP
671 DATE [ date\(hyand/or\(hytime ]
672 Shows current date\(hytime or interprets given date\(hytime.
673 .TP
674 RUN [ extern\(hycommand [ parameters... ]                 
675 Runs the given external command. Synonym: !.
676 .TP
677 EXEC [ extern\(hycommand [ params... ]
678 Kermit overlays itself with the given command.
679 .TP
680 SUSPEND
681 Stops Kermit and puts it in the background. Synonym: Z.
682 .RE
683 .SS
684 Local File Management
685 .RS
686 .TP
687 TYPE [ options ] filename
688 Displays the contents of the given file.
689 .TP
690 MORE [ options ] filename     
691 Equivalent to TYPE /PAGE (pause after each screenful).
692 .TP
693 CAT [ options ] filename      
694 Equivalent to TYPE /NOPAGE.
695 .TP
696 HEAD [ options ] filename     
697 Displays the first few lines of a given file.
698 .TP
699 TAIL [ options ] filename     
700 Displays the last few lines of a given file.
701 .TP
702 GREP [ options ] pattern filespec
703 Displays lines from files that match
704 the pattern. Synonym: FIND.
705 .TP
706 DIRECTORY [ options ] [filespec ]
707 Lists files (built\(hyin, many options).
708 .TP
709 LS [ options ] [ filespec ]   
710 Lists files (runs external "ls" command).
711 .TP
712 DELETE [ options ] [ filespec ]
713 Deletes files. Synonym: RM.
714 .TP
715 PURGE [ options ] [ filespec ]
716 Removes backup (*.~n~) files.
717 .TP
718 COPY [ options ] [ filespecs... ]
719 Copies files. Synonym: CP.
720 .TP
721 RENAME [ options ] [ filespecs... ]
722 Renames files. Synonym: MV.
723 .TP
724 CHMOD [ options ] [ filespecs... ]
725 Changes permissions of files.
726 .TP
727 TRANSLATE filename charsets [ filename ]
728 Converts file's character set. Synonym: XLATE.
729 .TP
730 CD
731 Changes your working directory to your home directory.
732 .TP
733 CD directory
734 Changes your working directory to the one given.
735 .TP
736 CDUP
737 Changes your working directory one level up.
738 .TP
739 PWD
740 Displays your working directory.
741 .TP
742 BACK
743 Returns to your previous working directory.
744 .TP
745 MKDIR [ directory ]
746 Creates a directory.
747 .TP
748 RMDIR [ directory ]
749 Removes a directory.
750 .RE
751 .SS
752 Making Connections
753 .RS
754 .TP
755 SET LINE [ options ] devicename                      
756 Opens the named serial port. Synonym: SET PORT.
757 .TP
758 OPEN LINE [ options ] devicename
759 Same as SET LINE. Synonym: OPEN PORT.
760 .TP
761 SET MODEM TYPE [ name ]
762 Tells Kermit what kind of modem is on the port.
763 .TP
764 DIAL [ number ]
765 Tells Kermit to dial the given phone number with the modem.
766 .TP
767 REDIAL
768 Redials the most recently dialed phone number.
769 .TP
770 ANSWER
771 Waits for and answers an incoming call on the modem.
772 .TP
773 AUTHENTICATE [ parameters... ]
774 Performs secure authentication on a TCP/IP connection.
775 .TP
776 SET NETWORK TYPE { TCP/IP, X.25, ... }
777 Selects network type for subsequent SET HOST commands.
778 .TP
779 SET HOST [ options ] host [ port ]                          
780 Opens a network connection to the given host and port.
781 .TP
782 SET HOST * port
783 Waits for an incoming TCP/IP connection on the given port.
784 .TP
785 TELNET [ options ] host
786 Opens a Telnet connection to the host and enters Connect state.
787 .TP
788 RLOGIN [ options ] host
789 Opens an Rlogin connection to the host and enters Connect state.
790 .TP
791 IKSD [ options ] host
792 Opens a connection to an Internet Kermit Service.
793 .TP
794 SSH [ options ] host
795 Opens an SSH connection to the host and enters Connect state.
796 .TP
797 FTP OPEN host [ options ]
798 Opens an FTP connection to the host.
799 .TP
800 HTTP [ options ] OPEN host
801 Opens an HTTP connection to the host.
802 .TP
803 PTY external\(hycommand
804 Runs the command on a pseudoterminal as if it were a connection.
805 .TP
806 PIPE external\(hycommand
807 Runs the command through a pipe as if it were a connection.
808 .RE
809 .SS
810 Using Connections
811 .RS
812 .TP
813 CONNECT [ options ]
814 Enters Connect (terminal) state.  Synonym: C.
815 .TP
816 REDIRECT command
817 Redirects the given external command over the connection.
818 .TP
819 TELOPT command
820 Sends a Telnet protocol command (Telnet connections only).
821 .TP
822 Ctrl\-\eC
823 "Escapes back" from Connect state to Command state.
824 .TP
825 Ctrl\-\eB
826 (In Connect state) Sends a BREAK signal (serial or Telnet).
827 .TP
828 Ctrl\-\e!
829 (In Connect state) Enters inferior shell; "exit" to return.
830 .TP
831 Ctrl\-\e?
832 (In Connect state) Shows a menu of other escape\(hylevel options.
833 .TP
834 Ctrl\-\eCtrl\-\e
835 (In Connect state) Type two
836 Ctrl\-Backslashes to send one of them.
837 .TP
838 SET ESCAPE [ character ]
839 Changes Kermit's Connect\(hystate escape character.
840 .RE
841 .SS
842 Closing Connections
843 .RS
844 .TP
845 HANGUP
846 Hangs up the currently open
847 serial\(hyport or network connection.
848 .TP
849 CLOSE
850 Closes the currently open
851 serial\(hyport or network connection.
852 .TP
853 SET LINE (with no devicename)
854 Closes the currently open
855 serial\(hyport or network connection.
856 .TP
857 SET HOST (with no hostname)
858 Closes the currently open serial\(hyport or network connection.
859 .TP
860 FTP CLOSE
861 Closes the currently open FTP connection.
862 .TP
863 HTTP CLOSE
864 Closes the currently open HTTP connection.
865 .TP
866 EXIT 
867 Also closes all connections. Synonym: QUIT.
868 .TP
869 SET EXIT WARNING OFF
870 Suppresses warning about open connections on exit or close.
871 .RE
872 .SS
873 File Transfer
874 .RS
875 .TP
876 SEND [ options ] filename [ as\(hyname ]
877 Sends the given file. Synonym: S.
878 .TP
879 SEND [ options ] filespec
880 Sends all files that match.
881 .TP
882 RESEND [ options ] filespec
883 Resumes an interrupted SEND from the point of failure.
884 .TP
885 RECEIVE [ options ] [ as\(hyname ]                    
886 Waits passively for files to arrive. Synonym: R.
887 .TP
888 LOG TRANSACTIONS [ filename ]
889 Keeps a record of file transfers.
890 .TP
891 FAST
892 Use fast file\(hytransfer settings (default).
893 .TP
894 CAUTIOUS
895 Use cautious and less fast file\(hytransfer settings.
896 .TP
897 ROBUST
898 Use ultra\(hyconservative and slow file\(hytransfer settings.
899 .TP
900 STATISTICS [ options ] 
901 Gives statistics about the most recent file transfer.
902 .TP
903 WHERE
904 After transfer: "Where did my files go?".
905 .TP
906 TRANSMIT [ options ] [ofilename ]
907 Sends file without protocol. Synonym: XMIT.
908 .TP
909 LOG SESSION [ filename ]
910 Captures remote text or files without protocol.
911 .TP
912 SET PROTOCOL [ name... ]
913 Tells Kermit to use an external file\(hytransfer protocol.
914 .TP
915 FTP { PUT, MPUT, GET, MGET, ... }
916 FTP client commands.
917 .TP
918 HTTP { PUT, GET, HEAD, POST, ... }
919 HTTP client commands.
920 .RE
921 .SS
922 Kermit Server
923 .RS
924 .TP
925 ENABLE, DISABLE
926 Controls which server features can be used by clients.
927 .TP
928 SET SERVER
929 Sets parameters prior to entering Server state.
930 .TP
931 SERVER
932 Enters Server state.
933 .RE
934 .SS
935 Client of Kermit or FTP Server
936 .RS
937 .TP
938 [ REMOTE ] LOGIN [ user password ]         
939 Logs in to a Kermit server or IKSD that requires it.
940 .TP
941 [ REMOTE ] LOGOUT
942 Logs out from a Kermit server or IKSD.
943 .TP
944 SEND [ options ] filename [ as\(hyname ]                   
945 Sends the given file to the server. Synonyms: S, PUT.
946 .TP
947 SEND [ options ] filespec
948 Sends all files that match.
949 .TP
950 RESEND [ options ] filespec
951 Resumes an interrupted SEND from the point of failure.
952 .TP
953 GET [ options ] remote\(hyfilespec
954 Asks the server to send the given files. Synonym: G.
955 .TP
956 REGET [ options ] remote\(hyfilespec
957 Resumes an interrupted GET from the point of failure.
958 .TP
959 REMOTE CD [ directory ]
960 Asks server to change its working
961 directory. Synonym: RCD.
962 .TP
963 REMOTE PWD [ directory ]
964 Asks server to display its working directory. Synonym: RPWD.
965 .TP
966 REMOTE DIRECTORY [ filespec... ]
967 Asks server to send a directory listing. Synonym: RDIR.
968 .TP
969 REMOTE DELETE [ filespec... ]
970 Asks server to delete files. Synonym: RDEL.
971 .TP
972 REMOTE [ command... ]
973 (Many other commands: "remote ?" for a list).
974 .TP
975 MAIL [ options ] filespec
976 Sends file(s) to be delivered as e\(hymail (Kermit only).
977 .TP
978 FINISH
979 Asks the server to exit server state (Kermit only).
980 .TP
981 BYE
982 Asks the server to log out and close the connection.
983 .RE
984 .SS
985 Script Programming
986 .PP
987 .RS
988 DEFINE, DECLARE, UNDEFINE, UNDECLARE, ASSIGN, EVALUATE, SEXPRESSION,
989 ARRAY, SORT, INPUT, OUTPUT, IF, FOR, WHILE, SWITCH, GOTO, ECHO, ASK,
990 GETC, GETOK, ASSERT, WAIT, SLEEP, FOPEN, FREAD, FWRITE, FCLOSE, STOP,
991 END, RETURN, LEARN, SHIFT, TRACE, VOID, INCREMENT, DECREMENT, ... For
992 these and many more you'll need to consult the manual and supplements,
993 and/or visit the Kermit Script Library, which also includes a brief
994 tutorial. Hint: HELP LEARN to find out how to get Kermit to write
995 simple scripts for you.
996 .RE
997 .PP
998 Many of Kermit's commands have synonyms, variants, relatives, and so on.
999 For example, MSEND is a version of SEND that accepts a list of file
1000 specifications to be sent, rather than just one file specification, and
1001 MPUT is a synonym of MSEND. MOVE means to SEND and then DELETE the source
1002 file if successful. MMOVE is like MOVE, but accepts a list of filespecs,
1003 and so on. These are described in the full documentation.
1004 .PP
1005 Use question mark to feel your way through an unfamiliar command, as in
1006 this example:
1007 .PP
1008 .nf
1009   C\-Kermit> remote ? One of the following:
1010    assign     directory  kermit     print      rmdir
1011    cd         exit       login      pwd        set
1012    copy       help       logout     query      space
1013    delete     host       mkdir      rename     type
1014   C\-Kermit> remote set ? One of the following:
1015    attributes   file         retry        transfer
1016    block\-check  receive      server       window
1017   C\-Kermit> remote set file ? One of the following:
1018    character\-set  incomplete     record\-length
1019    collision      names          type
1020   C\-Kermit> remote set file names ? One of the following:
1021    converted  literal
1022   C\-Kermit> remote set file names literal
1023   C\-Kermit>
1024 .PP
1025 .fi
1026 This is called menu on demand: you get a menu when you want one, but menus
1027 are not forced on you even when know what you're doing. Note that you can
1028 also abbreviate most keywords, and you can complete them with the Tab or
1029 Esc key. Also note that ? works for filenames too, and that you can use it
1030 in the middle of a keyword or filename, not just at the beginning. For
1031 example, "send x?" lists all the files in the current directory whose names
1032 start with 'x'.
1033 .SH INITIALIZATION FILE
1034 In its default configuration, C\(hyKermit executes commands from a file 
1035 called .kermrc in your home directory when it starts, unless it is given the
1036 \-Y or \-y command\(hyline option. Custom configurations might substitute a shared
1037 system\(hywide initialization file. The SHOW FILE command tells what
1038 initialization file, if any, was used. The standard initialization file
1039 "chains" to an individual customization file, .mykermc, in the home directory,
1040 in which each user can establish her/his own preferences, define macros, and
1041 so on.
1042 .PP
1043 Since execution of the initialization file (at least the standard one)
1044 makes C\(hyKermit take longer to start, it might be better not to have an
1045 initialization file, especially now that Kermit's default startup
1046 configuration is well attuned to modern computing and networking \(hy\(hy in
1047 other words, you no longer have do anything special to make Kermit
1048 transfers go fast. So instead of having an initialization file that is
1049 executed every time Kermit starts, you might consider making one or more
1050 kerbang scripts (with names other that .kermrc) that do NOT include an
1051 "exit" command, and invoke those when you need the settings, macro
1052 definitions, and/or scripted actions they contain, and invoke C\(hyKermit
1053 directly when you don't.
1054 .PP
1055 To put it another way... We still distribute the standard initialization
1056 file since it's featured in the manual and backwards compatibility is
1057 important to us. But there's no harm in not using it if you don't need the
1058 stuff that's in it (services directory, dialing directory, network
1059 directory, and associated macro definitions). On the other hand, if there
1060 are settings or macros you want in effect EVERY time you use Kermit, the
1061 initialization file (or the customization file it chains to) is the place
1062 to put them, because that's the only place Kermit looks for them
1063 automatically each time you start it.
1064 .SH MODES OF OPERATION
1065 Kermit is said to be in Local mode if it has made a connection to another
1066 computer, e.g. by dialing it or establishing a Telnet connection to it. The
1067 other computer is remote, so if you start another copy of Kermit on the
1068 remote computer, it is said to be in Remote mode (as long as it has not
1069 made any connections of its own). The local Kermit communicates over the
1070 communications device or network connection, acting as a conduit between
1071 the the remote computer and your keyboard and screen. The remote Kermit is
1072 the file\(hytransfer partner to the local Kermit and communicates only through
1073 its standard input and output.
1074 .PP
1075 At any moment, a Kermit program can be in any of the following states. It's
1076 important to know what they are and how to change from one to the other.
1077 .TP
1078 Command state
1079 In this state, Kermit reads commands from:
1080 .sp
1081 \(bu    Your keyboard; or:
1082 .br
1083 \(bu    A file, or:
1084 .br
1085 \(bu    A macro definition.
1086 .sp
1087 You can exit from Command state back to Unix with the EXIT or QUIT
1088 command (same thing). You can enter Connect state with any of various
1089 commands (CONNECT, DIAL, TELNET, etc). You can enter file transfer
1090 state with commands like SEND, RECEIVE, and GET. You can enter Server
1091 state with the SERVER command. The TAKE command tells Kermit to read
1092 and execute commands from a file. The (perhaps implied) DO command
1093 tells Kermit to read and execute commands from a macro definition.
1094 While in Command state, you can interrupt any command, macro, or
1095 command file by typing Ctrl\-C (hold down the Ctrl key and press the C
1096 key); this normally brings you back to the prompt.
1097 .TP
1098 Shell state
1099 You can invoke an inferior shell or external command from the Kermit
1100 command prompt by using the PUSH, RUN (!), EDIT, or BROWSE command.
1101 While the inferior shell or command is active, Kermit is suspended and
1102 does nothing. Return to Kermit Command state by exiting from the
1103 inferior shell or application.
1104 .TP
1105 Connect state
1106 In this state, which can be entered only when in Local mode (i.e. when
1107 Kermit has made a connection to another computer), Kermit is acting as
1108 a terminal to the remote computer. Your keystrokes are sent to the
1109 remote computer and characters that arrive over the communication
1110 connection are displayed on your screen. This state is entered when
1111 you give a CONNECT, DIAL, TELNET, RLOGIN, or IKSD command. You can
1112 return to command state by logging out of the remote computer, or by
1113 typing:
1114 .sp
1115   Ctrl\-\ec
1116 .sp
1117 That is: Hold down the Ctrl key and press the backslash key, then let
1118 go of the Ctrl key and press the C key. This is called escaping back.
1119 Certain other escape\(hylevel commands are also provided; type Ctrl\-\e?
1120 for a list. For example, you can enter Shell state with:
1121 .sp
1122   Ctrl\-\e!
1123 .sp
1124 To send a Ctrl\-\e to the host while in Connect state, type two of them
1125 in a row. See HELP CONNECT and HELP SET ESCAPE for more info.
1126 .TP
1127 Local file\(hytransfer state
1128 In this state, Kermit is sending packets back and forth with the other
1129 computer in order to transfer a file or accomplish some other
1130 file\(hyrelated task. And at the same time, it is displaying its progress
1131 on your screen and watching your keyboard for interruptions. In this
1132 state, the following single\(hykeystroke commands are accepted:
1133 .sp
1134 .RS
1135 .TP
1136 X
1137 Interrupt the current file and go on to the next (if any).
1138 .TP
1139 Z
1140 Interrupt the current file and skip all the rest.
1141 .TP
1142 E
1143 Like Z but uses a "stronger" protocol (use if X or Z don't work).
1144 .TP
1145 Ctrl\-C
1146 Interrupt file\(hytransfer mode (use if Z or E don't work).
1147 .sp
1148 .RE
1149 Kermit returns to its previous state (Command or Connect) when the
1150 transfer is complete or when interrupted successfully by X, Z, E, or
1151 Ctrl\-C (hold down the Ctrl key and press the C key).
1152 .TP
1153 Remote file\(hytransfer state
1154 In this state, Kermit is exchanging file\(hytransfer packets with its
1155 local partner over its standard i/o. It leaves this state
1156 automatically when the transfer is complete. In case you find your
1157 local Kermit in Connect state and the remote one in File\(hytransfer
1158 state (in which it seems to ignore your keystrokes), you can usually
1159 return it to command state by typing three Ctrl\-C's in a row. If that
1160 doesn't work, return your local Kermit to Command state (Ctrl\-\e C) and
1161 type "e\(hypacket" and then press the Return or Enter key; this forces a
1162 fatal Kermit protocol error.
1163 .TP
1164 Remote Server state
1165 This is like Remote File\(hytransfer state, except it never returns
1166 automatically to Command state. Rather, it awaits further instructions
1167 from the client program; that is, from your Local Kermit program. You
1168 can return the Remote Server to its previous state by issuing a
1169 "finish" command to the client, or if you are in Connect state, by
1170 typing three Ctrl\-C's in a row. You can tell the server job to log out
1171 and break the connection by issuing a "bye" command to the client.
1172 .TP
1173 Local Server state
1174 Like Remote\(hyServer state, but in local mode, and therefore with its
1175 file\(hytransfer display showing, and listening for single\(hykey commands,
1176 as in Local File\(hytransfer state. Usually this state is entered
1177 automatically when a remote Kermit program gives a GET command.
1178 .sp
1179 C\(hyKermit, Kermit 95, and MS\(hyDOS Kermit all can switch automatically from
1180 Connect state to Local File\(hytransfer state when you initiate a file
1181 transfer from the remote computer by starting Kermit and telling it to send
1182 or get a file, in which case, Connect state is automatically resumed after
1183 the file transfer is finished.
1184 .sp
1185 Note that C\(hyKermit is not a terminal emulator. It is a communications
1186 application that you run in a terminal window (e.g. console or Xterm). The
1187 specific emulation, such as VT100, VT220, Linux Console, or Xterm, is
1188 provided by the terminal window in which you are running C\(hyKermit. Kermit
1189 95 and MS\(hyDOS Kermit, on the other hand, are true terminal emulators. Why
1190 is C\(hyKermit not a terminal emulator? CLICK HERE to read about it.
1191 .SH MAKING CONNECTIONS
1192 Here is how to make different kinds of connections using interactive Kermit
1193 commands (as noted above, you can also make connections with command\(hyline
1194 options). Note that you don't have to make connections with Kermit. It can
1195 also be used on the far end of a connection as the remote file transfer and
1196 management partner of your local communications software.
1197 .TP
1198 Making a Telnet Connection
1199 At the C\(hyKermit command prompt, simply type:
1200 .sp
1201 .nf
1202   telnet foo.bar.com
1203 .fi
1204 .sp
1205 (substituting desired hostname or address).  
1206 You can also include a port number:
1207 .sp
1208 .nf
1209   telnet xyzcorp.com 3000 ; 
1210 .fi
1211 .sp
1212 If the connection is successful, Kermit automically enters Connect
1213 state. When you logout from the remote host, Kermit automatically
1214 returns to its prompt. More info: HELP TELNET, HELP SET TELNET, HELP
1215 SET TELOPT. Also see the IKSD section below.
1216 .TP
1217 Making an Rlogin connection
1218 This is just like Telnet, except you have to be root to do it because
1219 Rlogin uses a privileged TCP port:
1220 .sp
1221 .nf
1222   rlogin foo.bar.com
1223 .fi
1224 .sp
1225 More info: HELP RLOGIN.
1226 .TP
1227 Making an SSH Connection
1228 Unlike Telnet and Rlogin, SSH connections are not built\(hyin, but
1229 handled by running your external SSH client through a pseudoterminal.
1230 Using C\(hyKermit to control the SSH client gives you all of Kermit's
1231 features (file transfer, character\(hyset conversion, scripting, etc)
1232 over SSH.
1233 .sp
1234   ssh foo.bar.com
1235 .sp
1236 More info: HELP SSH, HELP SET SSH.
1237 .TP
1238 Dialing with a Modem
1239 If it's an external modem, make sure it is connected to a usable
1240 serial port on your computer with a regular (straight\(hythrough) modem
1241 cable, and to the telephone jack with a telephone cable, and that it's
1242 turned on. Then use these commands:
1243 .sp
1244 .nf
1245   set modem type usrobotics  ; Or other supported type
1246   set line /dev/ttyS0        ; Specify device name
1247   set speed 57600            ; Or other desired speed
1248   set flow rts/cts           ; Most modern modems support this
1249   set dial method tone       ; (or pulse)
1250   dial 7654321               ; Dial the desired number
1251 .fi
1252 .sp
1253 Type "set modem type ?" for a list of supported modem types. If you
1254 omit the SET MODEM TYPE command, the default type is
1255 "generic\(hyhigh\(hyspeed", which should work for most modern AT\(hycommand\(hyset
1256 modems. If the line is busy, Kermit redials automatically. If the call
1257 does not succeed, use "set dial display on" and try it again to watch
1258 what happens. If the call succeeds, Kermit enters Connect state
1259 automatically and returns to its prompt automatically when you log out
1260 from the remote computer or the connection is otherwise lost.
1261 .sp
1262 You can also dial from a modem that is accessible by Telnet, e.g. to a
1263 reverse terminal server. In this case the command sequence is:
1264 .sp
1265 .nf
1266   set host ts.xxx.com 2000   ; Terminal\(hyserver and port
1267   set modem type usrobotics  ; Or other supported type
1268   set dial method tone       ; (or pulse)
1269   dial 7654321               ; Dial the desired number
1270 .fi
1271 .sp
1272 If the terminal server supports the Telnet Com Port Option, RFC 2217,
1273 you can also give serial\(hyport related commands such as SET SPEED, SET
1274 PARITY, and so on, and Kermit relays them to the terminal server using
1275 the protocol specified in the RFC.
1276 .sp
1277 More info: HELP SET MODEM, HELP SET LINE, HELP SET SPEED, HELP SET
1278 FLOW, HELP DIAL, HELP SET DIAL, HELP SET MODEM, HELP SET 
1279 CARRIER\-WATCH, SHOW COMMUNICATIONS, SHOW MODEM, SHOW DIAL.
1280 .TP
1281 Direct Serial Port
1282 Connect the two computers, A and B, with a null modem cable (or two
1283 modem cables interconnected with a null\(hymodem adapter or modem
1284 eliminator). From Computer A:
1285 .sp
1286 .nf
1287   set modem type none   ; There is no modem
1288   set line /dev/ttyS0   ; Specify device name
1289   set carrier\-watch off ; If DTR CD are not cross\(hyconnected
1290   set speed 57600       ; Or other desired speed
1291   set flow rts/cts      ; If RTS and CTS are cross\(hyconnected
1292   set parity even       ; (or "mark" or "space", if necessary)
1293   set stop\-bits 2       ; (rarely necessary)
1294   set flow xon/xoff     ; If you can't use RTS/CTS
1295   connect               ; Enter Connect (terminal) state
1296 .fi
1297 .sp
1298 This assumes Computer B is set up to let you log in. If it isn't, you 
1299 can run a copy of Kermit on Computer B and follow approximately the
1300 same directions. More info: As above plus HELP CONNECT.
1301 .PP
1302 With modems or direct serial connections, you might also have to "set
1303 parity even" (or "mark" or "space") if it's a 7\(hybit connection.
1304 .PP
1305 Of the connection types listed above, only one can be open at a time.
1306 However, any one of these can be open concurrently with an FTP or HTTP
1307 session. Each connection type can be customized to any desired degree,
1308 scripted, logged, you name it. See the manual.
1309 .PP
1310 NOTE: On selected platforms, C\(hyKermit also can make X.25 connections. See
1311 the manual for details.
1312 .SH TRANSFERRING FILES WITH KERMIT
1313 There is a widespread and persistent belief that Kermit is a slow protocol.
1314 This is because, until recently, it used conservative tuning by default to
1315 make sure file transfers succeeded, rather than failing because they
1316 overloaded the connection. Some extra commands (or command\(hyline options,
1317 like \-Q) were needed to make it go fast, but nobody bothered to find out
1318 about them. Also, it takes two to tango: most non\(hyKermit\(hyProject Kermit
1319 protocol implementations really ARE slow. The best file\(hytransfer partners
1320 for C\(hyKermit are: another copy of C\(hyKermit (7.0 or later) and Kermit 95.
1321 These combinations work well and they work fast by default. MS\(hyDOS Kermit
1322 is good too, but you have to tell it to go fast (by giving it the FAST
1323 command).
1324 .PP
1325 Furthermore, all three of these Kermit programs support "autodownload" and
1326 "autoupload", meaning that when they are in Connect state and a Kermit
1327 packet comes in from the remote, they automatically switch into file
1328 transfer mode.
1329 .PP
1330 And plus, C\(hyKermit and K95 also switch automatically between text and
1331 binary mode for each file, so there is no need to "set file type binary" or
1332 "set file type text", or to worry about files being corrupted because they
1333 were transferred in the wrong mode.
1334 .PP
1335 What all of these words add up to is that now, when you use up\(hyto\(hydate
1336 Kermit software from the Kermit Project, file transfer is not only fast,
1337 it's ridiculously easy. You barely have to give any commands at all.
1338 .TP
1339 Downloading Files
1340 Let's say you have Kermit 95, C\(hyKermit, or MS\(hyDOS Kermit on your
1341 desktop computer, with a connection to a Unix computer that has
1342 C\(hyKermit installed as "kermit". To download a file (send it from Unix
1343 to your desktop computer), just type the following command at your
1344 Unix shell prompt:
1345 .sp
1346   kermit \-s oofa.txt
1347 .sp
1348 (where oofa.txt is the filename). If you want to send more than one
1349 file, you can put as many filenames as you want on the command line,
1350 and they can be any combination of text and binary:
1351 .sp
1352   kermit \-s oofa.txt oofa.zip oofa.html oofa.tar.gz
1353 .sp
1354 and/or you can use wildcards to send groups of files:
1355 .sp
1356   kermit \-s oofa.*
1357 .sp
1358 If you want to send a file under an assumed name, use:
1359 .sp
1360   kermit \-s friday.txt \-a today.txt
1361 .sp
1362 This sends the file friday.txt but tells the receiving Kermit that its
1363 name is today.txt. In all cases, as noted, when the file transfer is
1364 finished, your desktop Kermit returns automatically to Connect state.
1365 No worries about escaping back, re\(hyconnecting, text/binary mode
1366 switching. Almost too easy, right?
1367 .TP
1368 Uploading Files
1369 To upload files (send them from your desktop computer to the remote
1370 Unix computer) do the same thing, but use the \-g (GET) option instead
1371 of \-s:
1372 .sp
1373   kermit \-g oofa.txt
1374 .sp
1375 This causes your local Kermit to enter server mode; then the remote
1376 Kermit program requests the named file and the local Kermit sends it
1377 and returns automatically to Connect state when done.
1378 .sp
1379 If you want to upload multiple files, you have have use shell quoting
1380 rules, since these aren't local files:
1381 .sp
1382 .nf
1383   kermit \-g "oofa.txt oofa.zip oofa.html oofa.tar.gz"
1384   kermit \-g "oofa.*"
1385 .fi
1386 .sp
1387 If you want to upload a file but store it under a different name, use:
1388 .sp
1389   kermit \-g friday.txt \-a today.txt
1390 .TP
1391 Kermit Transfers the Old\(hyFashioned Way
1392 If your desktop communications software does not support autoupload or
1393 autodownload, or it does not include Kermit server mode, the procedure
1394 requires more steps.
1395 .sp
1396 To download a file, type:
1397 .sp
1398   kermit \-s filename
1399 .sp
1400 on the host as before, but if nothing happens automatically in
1401 response to this command, you have to switch your desktop
1402 communications software into Kermit Receive state. This might be done
1403 by escaping back using keyboard characters or hot keys (Alt\-x is
1404 typical) and/or with a command (like RECEIVE) or a menu. When the file
1405 transfer is complete, you have to go back to Connect state, Terminal
1406 emulation, or whatever terminology applies to your desktop
1407 communications software.
1408 .sp
1409 To upload a file, type:
1410 .sp
1411   kermit \-r
1412 .sp
1413 on the host (rather than "kermit \-g"). This tells C\(hyKermit to wait
1414 passively for a file to start arriving. Then regain the attention of
1415 your desktop software (Alt\-x or whatever) and instruct it to send the
1416 desired file(s) with Kermit protocol. When the transfer is finished,
1417 return to the Connect or Terminal screen.
1418 .TP
1419 If File Transfer Fails
1420 Although every aspect of Kermit's operation can be finely tuned, there
1421 are also three short and simple "omnibus tuning" commands you can use
1422 for troubleshooting:
1423 .RS
1424 .TP
1425 FAST
1426 Use fast file\(hytransfer settings. This has been the default since
1427 C\(hyKermit 7.0 now that most modern computers and connections
1428 support it. If transfers fail with fast settings, try . . .
1429 .TP
1430 CAUTIOUS
1431 Use cautious but not paranoid settings. File transfers, if they
1432 work, will go at medium speed. If not, try . . .
1433 .TP
1434 ROBUST
1435 Use the most robust, resilient, conservative, safe, and reliable
1436 settings. File transfers will almost certainly work, but they
1437 will be quite slow (of course this is a classic tradeoff; ROBUST
1438 was C\(hyKermit's default tuning in versions 6.0 and earlier, which
1439 made everybody think Kermit protocol was slow). If ROBUST doesn't
1440 do the trick, try again with SET PARITY SPACE first in case it's
1441 not an 8\(hybit connection.
1442 .RE
1443 .sp
1444 Obviously the success and performance of a file transfer also depends
1445 on C\(hyKermit's file transfer partner. Up\(hyto\(hydate, real Kermit Project
1446 partners are recommended because they contain the best Kermit protocol
1447 implementations and because we can support them in case of trouble.
1448 .sp
1449 If you still have trouble, consult Chapter 10 of Using C\(hyKermit, or
1450 send email to kermit\(hysupport@columbia.edu.
1451 .TP
1452 Advanced Kermit File\(hyTransfer Features
1453 Obviously there is a lot more to Kermit file transfer, including all
1454 sorts of interactive commands, preferences, options, logging,
1455 debugging, troubleshooting, and anything else you can imagine but
1456 that's what the manual and updates are for. Here are a few topics you
1457 can explore if you're interested by Typing HELP for the listed
1458 commands:
1459 .RS
1460 .TP
1461 Logging transfers:
1462 LOG TRANSACTIONS (HELP LOG)
1463 .TP
1464 Automatic per\(hyfile text/binary mode switching:
1465 SET TRANSFER MODE { AUTOMATIC, MANUAL } (HELP SET TRANSFER).
1466 .TP
1467 Cross\(hyplatform recursive directory tree transfer:
1468 SEND /RECURSIVE, GET /RECURSIVE (HELP SEND, HELP GET).
1469 .TP
1470 File collision options:
1471 SET FILE COLLISION { OVERWRITE, BACKUP, DISCARD, ... } (HELP SET FILE).
1472 .TP
1473 Update: Transfer only files that changed since last time:
1474 SET FILE COLLISION UPDATE (HELP SET FILE).
1475 .TP
1476 Filename selection patterns:
1477 (HELP WILDCARD).
1478 .TP
1479 Flexible file selection:
1480 SEND (or GET) /BEFORE /AFTER /LARGER /SMALLER /TYPE /EXCEPT, ...
1481 .TP
1482 Character\(hyset conversion:
1483 SET { FILE, TRANSFER } CHARACTER\-SET, ASSOCIATE, ...
1484 .TP
1485 File/Pathname control:
1486 SET { SEND, RECEIVE } PATHNAMES, SET FILE NAMES.
1487 .TP
1488 Atomic file movement:
1489 SEND (or GET) /DELETE /RENAME /MOVE\-TO
1490 .TP
1491 Transferring to/from standard i/o of other commands:
1492 SEND (or GET) /COMMAND
1493 .TP
1494 Recovery of interrupted transfer from point of failure:
1495 RESEND, REGET (HELP RESEND, HELP REGET).
1496 .RE
1497 .TP
1498 Non\(hyKermit File Transfer
1499 You can also use C\(hyKermit to transfer files with FTP or HTTP Internet
1500 protocols; see below.
1501 .sp
1502 On a regular serial or Telnet connection where the other computer
1503 doesn't support Kermit protocol at all, you have several options. For
1504 example, if your desktop communications software supports Zmodem, use
1505 "rz" and "sz" on the host rather than Kermit. But if Kermit is your
1506 desktop software, and you are using it to make calls or network
1507 connections to other computers that don't support Kermit protocol (or
1508 that don't have a good implementation of it), then if your computer
1509 also has external X, Y, or Zmodem programs that are redirectable,
1510 Kermit can use them as external protocols. HELP SET PROTOCOL for
1511 details.
1512 .sp
1513 You can also capture "raw" data streams from the other computer with
1514 LOG SESSION (HELP LOG and HELP SET SESSION\-LOG for details), and you
1515 can upload files without any protocol at all with TRANSMIT (HELP
1516 TRANSMIT, HELP SET TRANSMIT).
1517 .SH KERMIT'S BUILT\(hyIN FTP AND HTTP CLIENTS
1518 Kermit's FTP client is like the regular Unix FTP client that you're used
1519 to, but with some differences:
1520 .TP
1521 \(bu
1522 It has lots more commands and features.
1523 .TP
1524 \(bu
1525 Each FTP command must be prefixed with "ftp", for example "ftp open",
1526 "ftp get", "ftp bye", etc (this is not strictly true, but until you're
1527 more familiar with it, it's best to follow this rule).
1528 .TP
1529 \(bu
1530 Commands like "cd", "directory", etc, execute locally, not on the
1531 server. Use "ftp cd", "ftp dir", etc, to have them act on the server.
1532 .TP
1533 \(bu
1534 You can have an FTP session and a regular Kermit serial or Telnet
1535 session open at the same time.
1536 .TP
1537 \(bu
1538 FTP sessions can be fully automated.
1539 .PP
1540 Pending publication of the next edition of the manual, the Kermit FTP
1541 client is thoroughly documented at the Kermit Project website:
1542 .sp
1543   http://www.columbia.edu/kermit/ftpclient.html
1544 .sp
1545 You also can use HELP FTP and HELP SET FTP to get descriptions of Kermit's
1546 FTP\(hyrelated commands.
1547 .PP
1548 The HTTP client is similar to the FTP one, except you prefix each command
1549 with HTTP instead of FTP: HTTP OPEN, HTTP GET, HTTP PUT, HTTP CLOSE, etc.
1550 Type HELP HTTP for details, or visit the to view the manual supplements.
1551 HTTP connections can be open at the same time as regular serial or Telnet
1552 connections and FTP connections. So Kermit can manage up to three types
1553 connections simultaneously.
1554 .SH INTERNET KERMIT SERVICE
1555 C\(hyKermit can be configured and run as an Internet service (called IKSD),
1556 similar to an FTP server (FTPD) except you can (but need not) interact with
1557 it directly, plus it does a lot more than an FTP server can do. The TCP
1558 port for IKSD is 1649. It uses Telnet protocol. C\(hyKermit can be an Internet
1559 Kermit Server, or it can be a client of an IKSD. You can make connections
1560 from C\(hyKermit to an IKSD with any of the following commands:
1561 .sp
1562 .nf
1563   telnet foo.bar.edu 1649
1564   telnet foo.bar.edu kermit   ; if "kermit" is listed in /etc/services
1565   iksd foo.bar.edu
1566 .fi
1567 .sp
1568 The IKSD command is equivalent to a TELNET command specifying port 1649.
1569 For more information about making and using connections to an IKSD, see:
1570 .sp
1571   http://www.columbia.edu/kermit/cuiksd.html
1572 .sp
1573 You can run an Internet Kermit Service on your own computer too (if you are
1574 the system administrator). For instructions, see:
1575 .sp
1576   http://www.columbia.edu/kermit/iksd.html
1577 .SH SECURITY
1578 All of C\(hyKermit's built\(hyin TCP/IP networking methods (Telnet, Rlogin, IKSD,
1579 FTP, and HTTP) can be secured by one or more of the following IETF\(hyapproved
1580 methods:
1581 .PP
1582 \(bu    MIT Kerberos IV
1583 .br
1584 \(bu    MIT Kerberos V
1585 .br
1586 \(bu    SSL/TLS
1587 .br
1588 \(bu    Stanford SRP
1589 .PP
1590 For complete instructions see:
1591 .PP
1592   http://www.columbia.edu/kermit/security.html
1593 .PP
1594 And as noted previously, you can also make SSH connections with C\(hyKermit if
1595 you already have an SSH client installed.
1596 .SH ALTERNATIVE COMMAND\(hyLINE PERSONALITIES
1597 When invoked as "kermit" or any other name besides "ftp" or "telnet",
1598 C\(hyKermit has the command\(hyline options described above in the OPTIONS
1599 section. However, if you invoke C\(hyKermit as "telnet" or "ftp", it changes
1600 its command\(hyline personality to match. This can be done (among other ways)
1601 with symbolic links (symlinks). For example, if you want C\(hyKermit to be
1602 your regular Telnet client, or the Telnet helper of your Web browser, you
1603 can create a link like the following in a directory that lies in your PATH
1604 ahead of the regular telnet program:
1605 .sp
1606   ln \-s /usr/local/bin/kermit telnet
1607 .sp
1608 Now when you give a "telnet" command, you are invoking Kermit instead, but
1609 with its Telnet command\(hyline personality so, for example:
1610 .sp
1611   telnet xyzcorp.com
1612 .sp
1613 Makes a Telnet connection to xyzcorp.com, and Kermit exits automatically
1614 when the connection is closed (just like the regular Telnet client). Type
1615 "telnet \-h" to get a list of Kermit's Telnet\(hypersonality command\(hyline
1616 options, which are intended to be as compatible as possible with the
1617 regular Telnet client.
1618 .PP
1619 Similarly for FTP:
1620 .sp
1621   ln \-s /usr/local/bin/kermit ftp
1622 .sp
1623 And now type "ftp \-h" to see its command\(hyline options, and command lines
1624 just like you would give your regular FTP client:
1625 .sp
1626   ftp xyzcorp.com
1627 .sp
1628 but with additional options allowing an entire session to be specified on
1629 the command line. Finally, if Kermit's
1630 first command\(hyline option is a Telnet, FTP, IKSD, or HTTP URL, Kermit
1631 automatically makes the appropriate kind of connection and, if indicated by
1632 the URL, takes the desired action:
1633 .TP
1634 kermit telnet:xyzcorp.com
1635 Opens a Telnet session
1636 .TP
1637 kermit telnet://olga@xyzcorp.com
1638 Ditto for user olga
1639 .TP
1640 kermit ftp://olga@xyzcorp.com/public/oofa.zip
1641 Downloads a file
1642 .TP
1643 kermit kermit://kermit.columbia.edu/kermit/f/READ.ME
1644 Ditto for IKSD
1645 .TP
1646 kermit iksd://kermit.columbia.edu/kermit/f/READ.ME
1647 (This works too)
1648 .TP
1649 kermit http://www.columbia.edu/kermit/index.html
1650 Grabs a web page
1651 .fi
1652 .SH LICENSE
1653 C\(hyKermit has an unusual license, but a fair and sensible one since the
1654 Kermit Project must support itself out of revenue: it's not a BSD license,
1655 not GPL, not Artistic, not commercial, not shareware, not freeware. It can
1656 be summed up like this: if you want C\(hyKermit for your own use, you can
1657 download and use it without cost or license (but we'd appreciate it if you
1658 would purchase the manual). But if you want to sell C\(hyKermit or bundle it
1659 with a product or otherwise distribute it in a commercial setting EXCEPT
1660 WITH AN OPEN\(hySOURCE OPERATING SYSTEM DISTRIBUTION such as Linux, FreeBSD,
1661 NetBSD, or OpenBSD, you must license it. To see the complete license, give
1662 the LICENSE command at the prompt, or see the COPYING.TXT file distributed
1663 with C\(hyKermit 7.0 or later, or download it from
1664 .sp
1665   ftp://kermit.columbia.edu/kermit/c\-kermit/COPYING.TXT
1666 .sp
1667 Send licensing inquiries to kermit@columbia.edu.
1668 .SH BUGS
1669 See the following files for listings of known bugs, limitations,
1670 workarounds, hints and tips:
1671 .TP
1672 ckcbwr.txt
1673 General C\(hyKermit bugs, hints, tips.
1674 .TP
1675 ckubwr.txt
1676 Unix\(hyspecific C\(hyKermit bugs, hints, tips.
1677 .PP
1678 Report bugs and problems by email to:
1679 .sp
1680    kermit\-support@columbia.edu.
1681 .sp
1682 Before requesting technical support, please read the hints here:
1683 .sp
1684   http://www.columbia.edu/kermit/support.html
1685 .sp
1686 and also read the C\(hyKermit Frequently Asked Questions:
1687 .sp
1688   http://www.columbia.edu/kermit/ckfaq.html
1689 .SH OTHER TOPICS
1690 There's way more to C\(hyKermit than we've touched on here \(hy\(hy troubleshooting,
1691 customization, character sets, dialing directories, sending pages, script
1692 writing, and on and on, all of which are covered in the manual and updates
1693 and supplements. For the most up\(hyto\(hydate information on documentation (or
1694 updated documentation itself) visit the Kermit Project website:
1695 .sp
1696   http://www.columbia.edu/kermit/
1697 .PP
1698 There you will also find Kermit software packages for other platforms:
1699 different Unix varieties, Windows, DOS, VMS, IBM mainframes, and many
1700 others: 20+ years' worth.
1701 .SH DOCUMENTATION AND UPDATES
1702 The manual for C\(hyKermit is:
1703 .TP
1704 .I
1705 Using C\(hyKermit
1706 Frank da Cruz and Christine M. Gianone,
1707 Second Edition, Digital Press / Butterworth\(hyHeinemann, Woburn, MA, 1997, 622
1708 pages, ISBN 1\-55558\-164\-1. This is a printed book. It covers C\(hyKermit 6.0.
1709 .TP
1710 The C\(hyKermit 7.0 Supplement
1711 http://www.columbia.edu/kermit/ckermit70.html
1712 .TP
1713 The C\(hyKermit 8.0 Supplement
1714 http://www.columbia.edu/kermit/ckermit80.html
1715 .TP
1716 The C\(hyKermit 9.0 Supplement
1717 http://www.columbia.edu/kermit/ckermit90.html
1718 .PP
1719 Visit C\(hyKermit home page:
1720 .sp
1721   http://www.columbia.edu/kermit/ckermit.html
1722 .sp
1723 to learn about new versions, Beta tests, and other news; to
1724 read case studies and tutorials; to download source code, install packages,
1725 and prebuilt binaries for many platforms. Also visit:
1726 .TP
1727 http://www.columbia.edu/kermit/scriptlib.html
1728 The Kermit script library and tutorial
1729 .TP
1730 http://www.columbia.edu/kermit/newfaq.html
1731 The Kermit FAQ (Frequently Asked Questions about Kermit)
1732 .TP
1733 http://www.columbia.edu/kermit/ckfaq.html
1734 The C\(hyKermit FAQ (Frequently Asked Questions about C\(hyKermit)
1735 .TP
1736 http://www.columbia.edu/kermit/telnet.html
1737 C\(hyKermit Telnet client documentation
1738 .TP
1739 http://www.columbia.edu/kermit/security.html
1740 C\(hyKermit security documentation (Kerberos, SSL/TLS, etc)
1741 .TP
1742 http://www.columbia.edu/kermit/cuiksd.html
1743 Internet Kermit Service user documentation
1744 .TP
1745 http://www.columbia.edu/kermit/iksd.html
1746 Internet Kermit Service administrator documentation
1747 .TP
1748 http://www.columbia.edu/kermit/studies.html
1749 Case studies.
1750 .TP
1751 http://www.columbia.edu/kermit/support.html
1752 Technical support.
1753 .TP
1754 http://www.columbia.edu/kermit/k95tutorial.html
1755 Kermit 95 tutorial.
1756 .TP
1757 comp.protocols.kermit.misc
1758 The Kermit newsgroup (unmoderated).
1759 .SH FILES
1760 .TP
1761 COPYING.TXT
1762 C\(hyKermit license.
1763 .TP
1764 ~/.kermrc
1765 Initialization file.
1766 .TP
1767 ~/.mykermrc
1768 Customization file.
1769 .TP
1770 ~/.kdd
1771 Kermit dialing directory (see manual).
1772 .TP
1773 ~/.knd
1774 Kermit network directory (see manual).
1775 .TP
1776 ~/.ksd
1777 Kermit services directory (see manual).
1778 .TP
1779 ca_certs.pem
1780 Certificate Authority certifcates used for SSL connections.
1781 .TP
1782 ckuins.txt
1783 Installation instructions for Unix.  Also at
1784 http://www.columbia.edu/kermit/ckuins.html.
1785 .TP
1786 ckcbwr.txt
1787 General C\(hyKermit bugs, hints, tips.
1788 .TP
1789 ckubwr.txt
1790 Unix\(hyspecific C\(hyKermit bugs, hints, tips.
1791 .TP
1792 ckcplm.txt
1793 C\(hyKermit program logic manual.
1794 .TP
1795 ckccfg.txt
1796 C\(hyKermit compile\(hytime configuration options.
1797 .TP
1798 ssh
1799 (in your PATH) SSH connection helper.
1800 .TP
1801 rz, sz, etc.
1802 (in your PATH) external protocols for XYZmodem.
1803 .TP
1804 /var/spool/locks (or whatever)
1805 UUCP lockfile for dialing out (see installation instructions).
1806 .SH AUTHORS
1807 .TP
1808 Software
1809 Frank da Cruz and Jeffrey E Altman,
1810 .br
1811 1985\(hypresent, with contributions from hundreds of others all over the
1812 world.
1813 .TP
1814 Documentation
1815 Frank da Cruz
1816 .TP
1817 Address
1818 .nf
1819 The Kermit Project \(hy Columbia Univerity
1820 612 West 115th Street
1821 New York NY 10025\-7799
1822 USA
1823 .fi
1824 .TP
1825 E\(hyMail
1826 kermit@columbia.edu
1827 .TP
1828 Web
1829 http://www.columbia.edu/kermit/
1830 .fi
1831 .br