### The Columbia University Internet Kermit Service Daemon

Most recent update: 14 January 2000

CONTENTS

- WHY IKSD?
- CLIENT/SERVER MODE
- INTERACTIVE MODE
- SWITCHING MODES
- DIALUP ACCESS
- TIGHT COUPLING

The Internet Kermit Service Daemon (IKSD) is C-Kermit 7.0 running as an Internet service, similar to an FTP or Telnet server. It executes Telnet protocol just like a Telnet server and it transfers files like an FTP server. But unlike an FTP server, IKSD uses the Kermit file transfer protocol.

An IKSD may be accessed on TCP port 1649 using any Telnet client that allows a port specification and also includes Kermit protocol (and, as noted below, it may also be accessed by traditional serial communication programs too). Kermit Project clients are recommended for best results, but third-party commercial, shareware, or freeware clients may also be used.

To access the IKSD at the Kermit Project, instruct your Telnet client to make a connection to:

      kermit.columbia.edu kermit

or if that doesn't work:

      kermit.columbia.edu 1649

The syntax for specifying the TCP port number varies from client to client. (For starters, try clicking on the link above...)

WHY IKSD?

[Next] [Top]

Why an Internet Kermit Service Daemon when there are already FTP servers?

- Like FTP, Kermit provides a service that can be accessed from many different platforms with a consistent set of commands, but unlike FTP, these commands include programming constructions such as variables, arrays, looping and decision mechanisms, and local and remote procedure calls, thus allowing file transfer and management operations of arbitrary complexity to be easily automated.

- Like FTP, Kermit provides both text- and binary-mode data transfer, as well as file management capabilities. But Kermit also offers numerous features lacking from FTP:

  1. Kermit translates character sets. This includes the new sets that include the Euro symbol (required in all of Western Europe). So unlike with FTP, you can send your Italian, Norwegian, Portuguese, Hebrew, Greek, Russian, or Japanese text from a PC to UNIX (etc) without turning it to gibberish (other languages too, of course).

  2. Filename collision options (what to do when a file arrives that has the same name as an existing file) like backup, rename, reject, overwrite, update (reject if not newer). No transferring files needlessly when you already have them; no destroying important files by accident when the host sends a file that happens to have the same name.

  3. Kermit offers flexible file selection mechanisms (like "please send me the files whose names match this pattern, that were created between these two dates, that are larger than such-and-such a size but smaller than some other size, except don't send any files from this exception list, and don't bother sending any files that are older versions of the ones I have already").

  4. Preservation of timestamps and permissions. Timestamps are what allow the update feature to work. Permissions are important for security reasons, and also to allow executables to still be executable after transfer (so in UNIX, for example, you don't always have to remember to "chmod +x" a program or shell script after transfer before you can run it.)

  5. Automatic per-file text/binary mode switching. No more "set file type text", transfer all your text files, then "set file type binary" and transfer all your binary files.

  6. Directory-tree transfer. You can use Kermit to transfer a directory and all its files, and all its subdirectories and all their files, etc etc, not only between like platforms, but also from (say) a PC to UNIX or VMS, or VMS to UNIX, or any other combination, automatically switching between text and binary mode for each file, converting text-file formats and character sets from the source to destination platforms, yet still sending binary files without conversion. This has never been possible before.

- Unlike FTP, Kermit supports atomic file movement, in which the source file, the destination file, or both can be deleted (or renamed, or moved) when and only when it has been transferred successfully, as part of the transfer operation itself.

- Unlike most FTP implementations, Kermit supports recovery of interrupted binary-mode transfers from the point of failure. You can even use it to recover interrupted FTP transfers when FTP itself does not offer this option.

- Unlike standard FTP, Kermit can transfer data through firewalls, proxies, and network address translators on a single well-known port (unless the TCP port for the connection has been explicitly filtered).

- Unlike FTP, Kermit can transfer data across a combination of transports (e.g. dial-up to a terminal server and from there access IKSD on an Internet host).

- Unlike FTP, Kermit offers the ability to drive automated tasks from the server, even when the client does not support them. The server itself can be scripted.

- IKSD keeps an active-sessions database that can be monitored in realtime by the sysadmin to see who is logged in and what they are doing.

- Unlike traditional Kermit use over Telnet, anonymous access is possible, and the considerable overhead of the intervening Telnet server and pseudoterminal service is eliminated. Given a Telnet client with a good Kermit protocol implementation, file transfer performance is about the same as FTP.

CLIENT/SERVER MODE

[Next] [Prev] [Top]

IKSD can be used interactively by typing commands at its prompt (just as you would use C-Kermit), or in client/server mode.

A client/server connection is possible (as far as we know) only with Kermit Project Telnet clients (since third-party Kermit implementations rarely implement features beyond the bare minimum, and therefore don't include client commands). Recommended clients include:

- Kermit 95 for Windows 95/98/NT and OS/2
- MS-DOS Kermit for DOS and Windows 3.1
- C-Kermit for UNIX, VMS, VOS, OS-9, etc.

If you do not have one of these, skip ahead to the next section.

To make a client/server connection, tell your Telnet client to:

      set host kermit.columbia.edu 1649     ; (C-Kermit or Kermit 95)
      set port tcp kermit.columbia.edu 1649 ; (MS-DOS Kermit)

Now log in to the server like this:

      remote login username password

Since you probably don't have a Columbia user ID, you would normally supply "anonymous" (spelled out all the way) or "ftp" (a synonym for "anonymous") as the username, and your email address as the password, for example:

      remote login anonymous ivan@abccorp.com
      remote login ftp olga@xyzcorp.com

Note that you can't send any commands other than REMOTE LOGIN, REMOTE LOGOUT, REMOTE HELP, REMOTE EXIT, and BYE to the IKSD before you have logged in. Also note that when your client is C-Kermit 7.0 and later, LOGIN and LOGOUT may be given without the REMOTE prefix:

      login anonymous ivan@abccorp.com
      login ftp olga@xyzcorp.com

Ditto for Kermit 95 1.1.18 Beta.

Once logged in, you are situated at the root of the /pub/ftp tree. Use:

      remote directory

for a list of directories you can access, then use "remote cd" to change to the desired directory, for example:

      remote cd kermit

Whenever you change directories like this, you will receive an orientation message describing what is available in this area. If you would like to disable these messages, tell your client to:

      remote set cd-message off

(This command is new to C-Kermit 7.0 and K95 1.1.18).

To find out what commands the server will accept, type:

      remote help

Consult your MS-DOS Kermit, C-Kermit, or K95 manual for detailed descriptions. A brief summary follows; syntax may vary according to the Kermit client. Shortcut R-commands (like RCD, RDIR, etc) are available in C-Kermit 7.0 and K95 1.1.18:

[ REMOTE ] LOGIN [ username [ password ] ]
  Log in to the server. If you don't include a username, you will be prompted on a separate line; ditto for the password (and in this case, the password will not echo). Note: RLOGIN is not a shortcut for REMOTE LOGIN; RLOGIN makes a connection to the host's "login" port, just like the UNIX "rlogin" command; however, the REMOTE keyword is optional.

[ REMOTE ] LOGOUT
  Log out from the server. You can also use BYE or HANGUP, or (in newer Kermit versions) REMOTE EXIT (REXIT) or, simply, CLOSE.

GET filespec
  Ask the server to send the specified file or files.

REMOTE DIRECTORY [ filespec ] (RDIR)
  Ask the server to send a directory listing.

REMOTE CD directory (RCD)
  Ask the server to change to the given directory.

REMOTE PWD directory (RPWD)
  Ask the server to display its current directory.

REMOTE HELP (RHELP)
  Ask the server to list commands you can send to it.

REMOTE SET parameter value (RSET)
  Ask the server to change the given parameter to the given value. Type "remote set ?" for a list of possible values.

REMOTE TYPE filename (RTYPE)
  Ask the server to display the given file on your screen.

FINISH
  Exit client/server mode. Follow this command by CONNECT to access the IKSD prompt.

The following client commands are generally not accepted by the IKSD from anonymous users:

SEND filespec
  (Since most users do not have write access to our file system.) Ditto for REMOTE DELETE, REMOTE MKDIR, REMOTE RMDIR, REMOTE COPY, REMOTE RENAME, etc.

REMOTE HOST command (RHOST)
  Access to host commands is not allowed. Ditto for REMOTE WHO (RWHO).

MAIL address
  Anonymous users may not send email. Ditto for REMOTE PRINT (RPRINT).

Example:
  Suppose you want to pick up the latest C-Kermit Beta test source files from the Kermit Project archive on a daily basis, transferring only those that have changed since last time (error handing not shown).

        set host kermit.columbia.edu 1649  ; Make the connection
        remote login ftp olaf@wwwcorp.com  ; Log in
        remote cd kermit/test/text         ; Change to desired directory
        set file collision update          ; Use update mode
        fast                               ; Use fast file-transfer settings (1)
        mget makefile ck[cuw]*.[cwh]       ; Get all .txt files that changed (2)
        bye                                ; Log out and disconnect

Notes:

1. Fast file transfer settings are the default in C-Kermit 7.0 and Kermit 95.

2. Patterns incorporating character lists or ranges and string lists are new to C-Kermit 7.0 and K-95 1.1.18.

INTERACTIVE IKSD ACCESS

[Next] [Prev] [Top]

The IKSD can be accessed directly by your Telnet client's CONNECT command or terminal emulator (no particular terminal emulation is expected, needed, or used). For direct access with a Kermit Project client, use a TELNET command rather than SET HOST (or add a CONNECT command after your SET HOST command). For other clients, follow the instructions for making a Telnet connection.

Now you should see Username and Password prompts. Respond to them just as you would if logging into UNIX or VMS, e.g.:

      Username: olga
      Password: secret  (The password does not echo)

Underlining indicates material that you type. Press the Enter or Return key at the end of the underlined text.

If you do not have a user ID on the server system, supply a username of "anonymous" or "ftp", and your email address as the password:

      Username: anonymous
      Password: olga@olgacorp.com

Once you have logged in successfully, you will see the IKSD interactive command prompt, something like:

      (/users/olga/) IKSD>

The current directory is shown in parentheses. For anonymous users, this is initially the root of the /pub/ftp tree (shown as "/"):

      (/) IKSD>

What you see is nothing more than C-Kermit 7.0 with its prompt set to say "IKSD" instead of "C-Kermit". You can use any commands here that are accepted by C-Kermit 7.0, as described in the manual, Using C-Kermit, as augmented by the C-Kermit 7.0 release notes, `C-Kermit 7.0 update notes`, except that:

- Access to the system is disallowed (e.g. by RUN, PUSH, REDIRECT, "!").
- Secondary connections may not be made (SET HOST, TELNET, SET LINE, DIAL, etc).
- Write access to the file system is disabled if you are logged in anonymously.

If you have no idea what to type at the IKSD prompt, try typing the word HELP and then pushing the Enter or Return key.

For file-transfer purposes, interactive-mode IKSD is like C-Kermit in remote mode. If you tell it to SEND a file, you must get your client to receive it. All modern Kermit programs (MS-DOS Kermit 3.15 and later, C-Kermit 6.0 and later, and all versions of K95) support the "autodownload" feature for Kermit protocol, but you might have to enable it first with:

      set terminal autodownload on

(Autodownload is enabled by default in Kermit 95 and in C-Kermit 7.0; it must be explicitly enabled in C-Kermit 6.x and in MS-DOS Kermit.)

Assuming you have autodownload enabled in your client, you can initiate all file transfers from the IKSD prompt:

- SEND makes the client receive automatically.
- GET makes the client enter server mode so it can read the GET request.

and so on. If your Telnet client does not support autodownloads, you'll need to give whatever commands (or menu item choices, or button pushes) are required to get the local end of the file transfer going.

Of course, you can't send files to the IKSD unless you have the appropriate write permission, which is generally lacking for anonymous users.

It is beyond the scope of this document to explain all that is possible at the IKSD prompt. That is the subject of a 622-page book augmented by about a megabyte of online text. In general, the best reason for using interactive IKSD access is that the IKSD (C-Kermit 7.0) might have capabilities lacking from your Telnet/Kermit client. For example, your client might lack Kermit server-oriented commands like GET and REMOTE. It almost certainly lacks the flexible file-selection mechanisms of C-Kermit 7.0 unless it *is* C-Kermit 7.0. So, for example, suppose you want to get a group of files matching several different patterns with a particular range of sizes and dates, except for a certain file you want excluded, and some of them are text and others are binary, and the text files should have their character sets translated:

      (/u/ivan/files/) IKSD> set file character-set hp-roman8
      (/u/ivan/files/) IKSD> set transfer character-set latin1
      (/u/ivan/files/) IKSD> set transfer mode automatic
      (/u/ivan/files/) IKSD> msend /larger-than:10000 /smaller-than:20001 -
       /after:24-Dec-1998_0:00:00 /before:1-Jan-1999_0:00:00 -
       /except:c123.txt /recover c*.txt x*.zip *.tar.gz

To terminate an interactive IKSD session, type LOGOUT or EXIT at the IKSD prompt.

(Note that at some sites, the IKSD might be configured to allow only client/server mode.)

SWITCHING MODES

[Next] [Prev] [Top]

You can switch between client/server and interactive mode whenever you like. To switch from client/server to interactive mode, give the following commands to your client:

      finish
      connect

To switch from interactive to client server mode, give a SERVER command at the IKSD prompt, then escape back to your client (or access its menus, etc).

DIALUP ACCESS

[Next] [Prev] [Top]

A striking advantage of IKSD over a traditional FTP server is that IKSD can be accessed by dialup as well as by Telnet connections. This is possible when a terminal server may be dialed that can make a Telnet connection to the host where IKSD is running. Just dial up the terminal server and ask it to make a Telnet connection to port 1649 on the desired host. Everything except tight coupling (next section) works the same (but of course there might be transparency problems, which can be handled in the normal ways -- SET PARITY, SET PREFIXING, etc).

TIGHT COUPLING

[Prev] [Top]

Tight coupling ensures that the Kermit client and Kermit server are always ready to respond to each other using the proper command interface. For example, if the IKSD is in server mode and you give a CONNECT command to the client, the IKSD presents its interactive prompt. Conversely, if you give a SERVER command at the IKSD prompt, the client will return to its own command prompt or menu. If you return to the local command prompt while the IKSD is at its interactive prompt, then any subsequent server oriented commands (SEND, GET, REMOTE ...) automatically put the IKSD into server mode.

Tight coupling relies on a new Kermit-specific Telnet protocol option. Both the Telnet client and Telnet server must implement the KERMIT option. This requires that Telnet be used end-to-end and prevents tight coupling on dialup or multi-hop connections.

Tight coupling requires clients that implement the new protocols. Presently these include:

- C-Kermit 7.0
- Kermit 95 1.1.19

[Top]