Communicating with Kermit Kermit is a file transfer program, that enables two computers to exchange any type of file safely, even through noisy telephone lines, and even if the computers have different file-systems. Modern modems are so good at error-correction, that the most common type of problem are complete disconnects, but Kermit is also able to resume a transfer at a later time, so the file doesn't need to be retransmitted entirely. Kermit can also be used as a wrapper for pure network (telnet,ftp,rlogin) connections, so it can take over the terminal session to execute file transfers when needed, thus relieving you of having to log out and log in again, with a separate FTP program. Many users will probably want to use Zmodem, but as it is relying on the same mechanisms and is easier to use, Kermit is explained first, and Zmodem is only summarily presented. Connecting two computers Basically, your computer sends commands from the keyboard to the remote computer, in this case, Nyx. The commands you type is interpreted by your login shell at Nyx, and eventually, results from the execution of the command is presented on your computer monitor. After each command has completed, the remote system sends a "prompt", a short text to indicate, it is ready to receive a new command. +------+ Local Remote | | +----+ Results +-----+ | |-<--| |----<------------------| | +------+ | | | Nyx | +--------+ | | Commands | | / Keyboard \->| |------------------>----| | ------------ +----+ +-----+ Controlling a remote computer. When you need to transfer files, you want them to arrive safely at the other end. This can be done by starting programs at both computers, that agree on a particular method called "protocol", specifying how to send the file in pieces, and assemble at the other end. The pieces of the file are sent through the channel already opened for commands/results, and this functionality is suspended during the transfer. If - or rather when - errors occur, only the affected pieces (packets) need to be retransmitted, not the entire file. Kermit has its own protocol, but your communications program may support other protocols as well, of which Zmodem is probably the most convenient. Downloading files You may already be running a terminal program on your own computer, that supports Kermit, and thus only need to start Kermit at the other end (Nyx), before initiating the transfer at your own computer. To "download" or transfer a file from Nyx to your own computer, you start by activating the remote computers (Nyx) sending process: nyx$ kermit -s file.txt Return to your local Kermit and give a RECEIVE command. KERMIT READY TO SEND... ... @-#Y3~^#T[0___B"U1Z The garbage above is meant for (and makes sense to) the receiving Kermit, and you can safely ignore it; it will be retransmitted when you get the reception process started: Now, you issue the receive command to your own computer, either by selecting Kermit-receive on the file transfer menu of your communications program, or, if you are using a command-line version of Kermit, enter the escape-sequence, and type "receive" when Kermit's prompt appears, like this: C-Kermit>receive C-Kermit>connect Connecting to host nyx. The escape character is Ctrl-\ (ASCII 28, FS) Type the escape character followed by C to get back, or followed by ? to see other options. nyx$ The connect command is necessary with the command-line version of Kermit, to resume control of the remote computer. If you are using a menu-based program, the program will do it automatically. The "escape-sequence" is reported by Kermit in response to the "connect" command, typically Alt-X on DOS, and Ctrl-\ followed by a literal "c", on Unix, that is, Hold down the Ctrl key and hit \ then release both and type c The "connect"-command acts as a switch that connects your keyboard and monitor to the remote computer, and the "escape-sequence" flips the switch back, to control your own, or the local computer. To abort a Kermit transmission completely, you can send Ctrl-C to the remote computer several times, until you get the normal command prompt back. Uploading files To upload a file, or transfer from the local (your) computer to a remote host (Nyx), you start by issuing the receive command at the other end, and subsequently the transmit command at your own computer: nyx$ kermit -r Return to your local Kermit and give a SEND command. KERMIT READY TO RECEIVE... Then, you start the transmit command on your own computer, either by selecting Kermit-send on the file-transfer menu, or, by escaping to Kermit's command mode, and issue: C-Kermit>send file.txt C-Kermit>connect Connecting to host nyx. The escape character is Ctrl-\ (ASCII 28, FS) Type the escape character followed by C to get back, or followed by ? to see other options. nyx$ Again, the connect command is only required in the command-line version of Kermit. More work You may want to transfer multiple files, and / or transfer files in both directions, and then it is convenient to enter Kermit server-mode at the remote end: nyx$ kermit -x Entering server mode. If your local Kermit software is menu driven, use the menus to send commands to the server. Otherwise, enter the escape sequence to return to your local Kermit prompt and issue commands from there. Use SEND and GET for file transfer. Use REMOTE HELP for a list of other available services. Use BYE or FINISH to end server mode. KERMIT READY TO SERVE... The above paragraph is Kermit's own words, and it seems to explain the steps thoroughly. Wrap it up If you need to transfer many or large files, you can make life a lot easier, by making an archive of all the files, and only transfer the archive, which will be much smaller, and therefore transfer faster: nyx$ zip archive file1.txt file2.* nyx$ kermit -s archive.zip [Escape sequence] C-Kermit>receive C-Kermit>connect [Connect message] nyx$ If you have made an archive with pkzip, on your own computer, and uploaded it, as described above, it can be unpacked at nyx with unzip: nyx$ unzip -l archive will list the contents, and if the -l is omitted, all the files will be unpacked. Zmodem As mentioned earlier, Zmodem may be more convenient, as you normally only need to start the process on one computer, which in turn, will make the other computer respond appropriately: In some cases, you start the Zmodem transfer at the remote host, and the garbage it issues, is detected by the communications program on your own computer, which makes it start its own part of the transfer. To download a file, you start the transmission at nyx: nyx$ sz archive.zip **B00000000000000 The **B00.. is the signal to the local computer to start reception. If nothing happens, you may need to activate ZModem-download explicitly, on the file transfer menu. To upload, you start reception at Nyx: nyx$ rz rz waiting to receive.**B0100000027fed4 If nothing happens, you may need to activate the local transmission explixitly, as above. If you want to abort a transmission with Zmodem, you need to send Ctrl-X to the remote computer, several times, until you get the shell prompt back. Some programs enables you to start the transfer on your own computer, which will then start by sending the required rz or sz command to Nyx, before starting the transfer locally. Where to go Kermit has extensive, context sensitive help available online, activated by a a question mark, ? at any position within a command, will display a list of available parameters for the current context. A more verbose help is available, if you enter help C-Kermit>help send C-Kermit>introduction Make a test file, and send it between the computers a couple of times, to get familiar with the program, before you use it with any important files. Try what happens when you store a file under the same name twice, and note how they arrive, when transferring files from subdirectories. As most Unix programs, Kermit as well as rz and sz, responds to -? as the only command-line argument, with a list of possible options. For more detailed explanations, consult the online manual: man kermit; man rz; man sz For help with specific problems, try the newsgroups nyx.help and comp.protocols.kermit.misc A list of Frequently Asked Questions (FAQ) is available at http://www.columbia.edu/kermit/faq.html Customization Kermit can be customized by entering your preferences in a file called .kermrc in your home directory: set file character-set latin1-iso set file collision backup set file type binary set window-size 3 set receive packet-length 5000 set block 2 Take note of the last 3 lines, they speed up the file transfers significantly.