Windows Internet Kermit Service - User Guide

[ Contents ] [ WIKSD Admin Guide ] [ Kermit 95 Home ] [ Kermit Home ]

ABSTRACT: How to use the Windows Internet Kermit Service: a standards-compliant File Transfer and Management Shell for Windows NT, 2000, and XP from the Kermit Project at Columbia University, available in free and secure versions.

   As of Kermit 95 version: 2.0
   This file last updated: 4 June 2002   (New York City time)

IF YOU ARE READING A PLAIN-TEXT version of this document, it is a plain-text dump of a Web page. You can visit the original (and possibly more up-to-date) Web page here:

  http://www.columbia.edu/kermit/wiksduser.html


CONTENTS

  1. INTRODUCTION
  2. INTERACTIVE USE
     2.1. K95 as a Windows Shell
     2.2. How to Enter K95 Commands
     2.3. How to Edit K95 Commands
     2.4. Recalling Previous Commands
     2.5. Cancelling a Command in Progress
     2.6. Special Characters in Commands
     2.7. Multi-Purpose Fields
     2.8. Screen Formatting
     2.9. Lots of Features
  3. TRANSFERRING FILES
     3.1. Sending Files from IKSD to Your Computer
     3.2. Sending Files from Your Computer to IKSD
  4. CLIENT/SERVER
  5. AUTOMATION
  6. APPLICATIONS AND EXAMPLES


1. INTRODUCTION

[ Top ] [ Contents ] [ Next ]

The Windows Internet Kermit Service Daemon (WIKSD) for Windows NT, 2000, and XP from the Kermit Project at Columbia University lets anybody with a suitable Telnet client make connections and log in to an Internet-connected Windows PC and download, upload, and manage files. WIKSD is a self-contained, user-friendly, text-mode file-transfer and -management shell that can be accessed by Telnet using either clear-text or secure authentication methods. Here are the kinds of things that WIKSD can do (within your logged-in access rights):

Thus automation is possible through any combination of server-side and client-side scripts. IKSD-aware clients (such as Kermit 95 and C-Kermit) can even make remote procedure calls, pass variables back and forth, etc.

Here are the kinds of things WIKSD does not do:

Thus WIKSD fills the same role as an FTP server, but with some important differences:

WIKSD is not available for Windows 95, 98, or ME for security reasons and because those operating systems do not support background services.

WIKSD is a specially configured version of Kermit 95 (K95). As such, it has most of the same commands as Kermit 95 itself, as well as its cousins C-Kermit on UNIX, VMS, and other platforms, and MS-DOS Kermit on DOS and Windows 3.x. Internet Kermit servers are also available for UNIX, such as THIS ONE at the Kermit Project.

The rest of this document explains how to make connections to WIKSD and how to use them. For further information, you can also consult:

The WIKSD Administrator's Guide
http://www.columbia.edu/kermit/wiksdadmin.html

The Unix-based Kermit Project IKSD User Guide
http://www.columbia.edu/kermit/cuiksd.html

The Unix IKSD Administrator Guide
http://www.columbia.edu/kermit/iksd.html

The Kermit Home Page
http://www.columbia.edu/kermit/index.html

The Kermit 95 Home Page
http://www.columbia.edu/kermit/k95.html

The Kermit 95 Tutorial
http://www.columbia.edu/kermit/k95tutor.html

The C-Kermit Home Page
http://www.columbia.edu/kermit/ckermit.html

The C-Kermit Tutorial
http://www.columbia.edu/kermit/ckututor.html

The Kermit Script Library
http://www.columbia.edu/kermit/scriptlib.html

Kermit Manuals
http://www.columbia.edu/kermit/manuals.html


2. INTERACTIVE USE

[ Top ] [ Contents ] [ Next ] [ Previous ]

WIKSD can be accessed from any Telnet client that lets you specify TCP port 1649 (the "kermit" service, assigned by the Internet Assigned Numbers Authority, IANA):

  telnet olga.xyzcorp.com 1649

But for reasons that will emerge shortly, some Telnet programs make better WIKSD clients than others. The ideal Telnet client for this purpose:

Late-model Kermit programs (K95 and C-Kermit) also include an IKSD command, which is the same as the TELNET command, but chooses port 1649 ("kermit") rather than port 23 ("telnet"):

  iksd olga.xyzcorp.com

If you are using C-Kermit or Kermit 95 as your client, and you are making a connection to a server where you must log in with a different user ID than the one on your client, use one of the following forms:

telnet /user:olaf olga.xyzcorp.com 1649
Specifies the User ID in a switch to the TELNET command.

telnet /user:olaf olga.xyzcorp.com kermit
Same as the previous example but using the service name "kermit" rather than the port number 1649. This works if "kermit" is listed in your local TCP services file. If it doesn't work, you'll have to use the port number.

iks /user:olaf olga.xyzcorp.com
Same as previous, but using IKSD command instead of TELNET, which makes a connection to the Kermit Service port (1649) instead of the Telnet port (23).

iks /user: olga.xyzcorp.com
Same as previous, but here we tell Kermit to use a blank User ID, which forces a User ID prompt so you can enter it from the keyboard.

iks /user:anonymous olga.xyzcorp.com
Makes an anonymous connection to the Kermit Service, if the service has been configured to allow it.

All of the forms shown above give you an interactive terminal session to the IKSD command processor. If you want make a scripted and/or client/server connection, use the "set host" command, explained in Section 4 and Section 5.

Once you make the connection, you receive Username: prompt (if the username was not already sent ahead) and a Password: prompt. If the owner of the PC has furnished you with an ID, use it. If not, you can try a user name of "anonymous" (and use your email address as the password). Anonymous logins are permitted at the discretion of the PC owner. Example (the parts you type are underlined):

  Username: anonymous           (To log in anonymously)
  Password: [email protected]    (Supply your email address as password)

When logging in as a real user, the security of the login depends on your client and the configuration of the server. In the worst case, your password is sent in the clear over the Internet (as it would be with a regular Telnet connection):

  Username: olga                (Type user ID, then press Return or Enter)
  Password: secret              (Password doesn't echo)

In the best case, the login is secured by protocols such as Kerberos 4, Kerberos 5, TLS, SRP, or (Windows-to-Windows connections) NTLM. Consult the documentation of your Telnet client to find out if it supports the same forms of security that the server offers, and if so, how to use them. When secure methods are used, you might not need to supply your username or password. WIKSD tells which security methods it has available if you give it the SHOW AUTHENTICATION command. Ditto for K95 and C-Kermit clients. Security is covered in a separate document.

NOTE: When you log in as a real user, your K95CUSTOM.INI is executed. Certain K95 commands are not accepted by WIKSD, so you should structure your K95CUSTOM.INI file not to execute them if K95 is acting as WIKSD. CLICK HERE for details.

The owner of the server PC also decides which directories you can access and what access rights you have. If you log in to WIKSD as a real user in Windows NT, 2000, or XP, your initial current directory is the "home folder" from your user profile, and you have all the same access rights you would have if you had logged in any other way. The PC owner has the ability (and the right) to log your activities in the NT Event Log to any desired level of detail.

To log out from WIKSD, give any of the following commands: LOGOUT, EXIT, or QUIT. Or simply have your Telnet client close the connection.

While logged in, you are presented with the Kermit 95's IKSD prompt, similar to the "DOS" or Command prompt:

  [C:\OLGA\] IKSD>

(your current disk and directory are shown in brackets).

K95 (as WIKSD) offers a wide range of file management and transfer functions in a friendly and helpful interactive command-line interface. Like the Windows Command window:

Unlike the Windows Command window:

And:


2.1. K95 as a Windows Shell

Let's begin by looking at K95 as an alternative to the Windows Command shell. How does it stack up against the regular Command Window? First, note that K95 does not offer system management commands, disk formatting, and so on. These should be used only from the PC's real keyboard and screen by the PC's owner. Second, it cannot be used for starting or running external programs; this is mainly for security reasons.

The term "DOS" (Disk Operating System) is used in this document to refer to the text-mode command-and-prompt interface and command repertoire of the Windows Command Window. The proper name for this window varies from one Windows release to the next ("MS-DOS Prompt", "Console Window", "Command Window", etc), but the usage and command repertoire is about the same, with certain differences (e.g. to delete a directory tree, one shell might have no command at all, another might use DELTREE, and still another might use DEL /S).

Here is a side-by-side comparison keyed on common DOS commands, DOS on the left, K95 on the right. Slanted square brackets enclose optional fields. Italic words are parameters that you would replace by actual values, for example "disk-letter" might be replaced by "C". In case you are wondering why Kermit commands are not identical to DOS commands, it's because (a) Kermit runs on many platforms, not just Windows, and tries to maintain common syntax in all versions, and (b) Kermit predates both DOS and Windows.

  Windows Command                K95 Command
  disk-letter:                   CD disk-letter:
  CD directory                   CD [[disk:][directory]]
  CD                             PWD
  (none)                         BACK

Notes: In K95, CD given with no operand returns to the default or home directory, whereas in DOS it prints the name of the current directory. Unlike in DOS, a disk letter can be included in K95's CD command. Use PWD to display the current directory. K95 also has a BACK command to return to the previous directory. Type HELP CD at the IKSD> prompt for more information.

  Windows Command                K95 Command
  CHKDSK [disk-letter]           SPACE [disk-letter]

Note: K95's SPACE command doesn't check the disk; it shows how much space is used and free without checking the disk. CHKDSK is a true DOS command, not available in most Windows shells.

  Windows Command                K95 Command
  COPY [options] source dest     COPY [options] source dest

Notes: K95 COPY has more options, including some you might not expect, like for Base64 encoding and decoding, byte-swapping, etc. K95 also has a TRANSLATE command, which is like COPY, but it converts the file's character set. HELP COPY and HELP TRANSLATE for more information.

  Windows Command                K95 Command
  DATE                           DATE [date]

Notes: K95 DATE does not set the date, it only shows it (and the time). If you give it a date or time or date-time operand (in almost any format), it gives it back to you in standard format. It can also be used to do date/time arithmetic, e.g. "date 1 january 2002 +1000days". HELP DATE for details.

  Windows Command                K95 Command
  DEL [options] filespec         DELETE [options] filespec
  DELTREE [options] filespec     DELETE /TREE [options] filespec

Note: K95 DELETE has more options, including file selection by date and/or size, exception lists, etc. It can also delete selected or all files recursively (i.e. down through subdirectories), and therefore also stands in for DELTREE. HELP DELETE for details.

  Windows Command                K95 Command
  DIR [options] [filespec]       DIRECTORY [options] [filespec]

Note: K95 DIRECTORY has many more options, including selection options, listing options, sorting options, and (like DOS DIR /S) can operate recursively. HELP DIRECTORY to read about all the options.

  Windows Command                K95 Command
  EXIT                           EXIT [ status [ message ] ]
  FIND [options] "string" file   FIND [options] "string" file 
  MORE file                      MORE [options] file
  PRINT [options] file           PRINT [options] file
  PROMPT string                  SET PROMPT string
  RENAME source dest             RENAME [options] source dest
  MKDIR directory                MKDIR directory
  RMDIR directory                RMDIR directory
  TIME                           DATE [date-and/or-time]
  TYPE file                      TYPE [options] file
  (none)                         HEAD [options] file
  (none)                         TAIL [options] file

Note: K95 TYPE has numerous options, governing paging, selection of lines, and even character-set translation. The K95 FIND command also searches for patterns, not just literal strings, and has many options, including recursive (subdirectory) searches, and can also be invoked as GREP (as in UNIX) or SEARCH (as in VMS). Type HELP for any of these commands (or any other command) for a description of the syntax and purpose of the command.

K95 also has all the capabilities of DOS Batch (in the following list, commands means one or more commands, separated by commas):

  Windows Command                K95 Command
  CALL file [ parameters ]       TAKE file [ parameters ]
  ECHO text                      ECHO text
  FOR var IN set DO command      FOR var init final increment { commands }
  GOTO label                     GOTO label
  IF condition command           IF condition { commands } ELSE { commands }
  PAUSE seconds                  PAUSE seconds-or-time-of-day
  REM                            COMMENT or ; or #
  SHIFT                          SHIFT [ number ]
  (none)                         WHILE condition { commands }
  (none)                         SWITCH v { case-statements }

Plus lots more (command recall, keyword abbreviation, filename and keyword completion, context-sensitive help, etc, plus the substantive features of IKSD itself, which are the topic of the rest of this document).


2.2. How to Enter K95 Commands

The demo server listed in this section, iks.kermit.columbia.edu, is not in service yet; therefore this section is for future reference only.

Let's illustrate some of K95's basic features in a real session. Use your favorite Telnet client to make a connection to the public Windows Internet Kermit Service at the Kermit Project (the parts you type are underlined):

  telnet iks.kermit.columbia.edu 1649

  Username: anonymous
  Password: [email protected]

  [C:\GUEST\] IKSD>

The last line is the prompt. The current disk and directory appear in brackets on the left margin, and "IKSD>" tells you that you're talking to an Internet Kermit Service Daemon and it's waiting for a command from your keyboard. Begin by typing "help" (and then pressing the Enter or Return key):

  [C:\GUEST\] IKSD> help

  IKS-NT 1.99 Dev.01, 1 Jan 2002, Copyright (C) 1995, 2002,
  Trustees of Columbia University in the City of New York.

  Type INTRO   for a brief introduction to the Kermit Command screen.
  Type VERSION for version and copyright information.
  Type HELP    followed by a command name for help about a specific command.
  Type NEWS    for news about new features.
  Type SUPPORT to learn how to get technical support.
  Press ?      (question mark) at the prompt, or anywhere within a command,
               for a menu (context-sensitive help, menu on demand).

Type "intro" (and then press the Enter or Return key). Now you get a brief introduction to the available commands. Since the introduction is longer than your screen, K95 pauses at the end of each screenful to give you a chance to read it, and gives you the prompt:

  more? (Y or space-bar for yes, N for no)

This occurs whenever K95 produces a long listing. As the prompt says, press the Space Bar or the Y key to continue to the next screenful, or the N (or Q) key to quit and return to the prompt. You can also press G (meaning "Go") to show all the rest without pausing.

2.2.1. Getting Help for Individual Commands

The INTRO listing mentions various commands. Pick one and type a HELP command for it (remember to press the Enter or Return key after the last word in the command), for example:

  [C:\GUEST\] IKSD> help directory

This shows the kind of help text you can get for each command. "help" and "directory" are called keywords. K95 lets you abbreviate keywords as much as you want, as long as the abbreviation does not conflict with any other keywords that are valid in the same position. In this case you could use "he dir", or even "h dir" ("h" is a special abbreviation for "help", even though several other commands begin with "h").

2.2.2. Help and Completion for Command Fields

Now let's explore K95's context-sensitive help feature. At the prompt, press the ? (question-mark) key (on most keyboards this requires also holding down the Shift key):

  [C:\GUEST\] IKSD> ? Command, one of the following:
   add           directory     increment     pwd           space
   apc           disable       input         query         statistics
   array         do            intro         quit          status
   ...

(many more are shown). These are K95's commands. You can type HELP for any of them. But first, let's explore the "?" feature:

K95's question-mark feature also works in filename fields. If you type a question mark when Kermit wants you to type a filename:

  [C:\GUEST\] IKSD> take ? Commands from file, one of the following:

it lists the files in the current directory. If you type part of a filename and then question mark, K95 lists files that match the part you typed so far:

  [C:\GUEST\] IKSD> take abc?

This lists all files whose names start with "abc" (see Section 2.7 for more about file lists).

Using Tab (or Esc) and Question Mark, you can easily feel your way through all of K95's commands. With some practice, you can fly through any command with minimum effort and keystrokes. If you make a mistake, you receive an informative, context-sensitive error message.


2.3. How to Edit K95 Commands

K95 includes a simple command editor that uses Control characters. You produce a Control character by holding down the Ctrl or Control key on your keyboard and then pressing a letter key. For example, to type Ctrl-A, hold down the Ctrl key, press the A key, and then let go of both keys.

The K95 command-editing keys are:

  Backspace:  Erases the character left of the cursor.
  Delete:     Same as Backspace.
  Ctrl-H:     Same as Backspace.
  Ctrl-W:     Erases the "word" left of the cursor.
  Ctrl-U:     Erases back to the prompt.

There is no way to edit the "inside" of a command; you can only remove letters or words from the right. You can't use Arrow, Function, or Editing keys (such as Insert, Home, etc) to edit K95 commands.


2.4. Recalling Previous Commands

K95 remembers the last 10 commands you have entered (you can increase this number with SET COMMAND RECALL-BUFFER-SIZE n, where n is any number).

To recall the previous command, type Ctrl-P ("P" for Previous) or Ctrl-B ("Back"). This displays the previous command at the prompt as if you had typed it. If you press the Enter or Return key, it is executed. You can use Ctrl-W or Backspace/Ctrl-H to edit it, or Ctrl-U to get back to the prompt.

To recall the command before the previous command, type Ctrl-P twice. And so on. If you go back too far, you can use Ctrl-N ("Next") to move forwards.

The REDO command executes the most recent command that begins with the given text, e.g. "redo dir" re-executes your most recent "dir" command.

SHOW HISTORY displays the command recall buffer.


2.5. Cancelling a Command in Progress

Ctrl-C should cancel any command in progress (i.e. after you have entered it by pressing the Enter or Ctrl-C key). If one Ctrl-C doesn't do it, try two or three.


2.6. Special Characters in Commands

In the cross-platform Kermit command language, the backslash (\) character is not taken literally, but indicates that whatever follows is to be treated specially. This lets you enter characters in commands that normally are used for other purposes, such as control characters or question marks. It is also the basis for string substitution, macro processing, and script programming.

But Windows uses backslash in file specifications, to separate directory names from file names and from each other, e.g.:

  C:\WINDOWS\SYSTEM\CONAGENT.EXE

So to enter Windows filenames that contain backslashes at the Kermit command prompt, you must either double them:

  C:\\WINDOWS\\SYSTEM\\CONAGENT.EXE

or else use "forward slash" instead:

  C:/WINDOWS/SYSTEM/CONAGENT.EXE

(Under certain circumstances, K95 might recognize a single backslash in a file or directory name as a directory separator -- in fact, it goes to extraordinary lengths to "guess" whether you intend a single backslash to be a directory separator or a variable- or function-introducer -- but since it can't read your mind, it's best to use forward slash or double backslash to eliminate all ambiguity.)

Another character to watch out for is Space. Spaces are used by Kermit (and all other command languages) to delimit fields within a command. Since Kermit is a file-transfer and management program, many of its commands include filename fields. But some Windows directory and file names contain spaces, e.g.:

  C:\Program Files\Microsoft Office\Microsoft Photo Editor.lnk

To refer to any such file at the Windows Command ("DOS") prompt, you must enclose its name in doublequotes:

  dir "C:\Program Files\Microsoft Office\Microsoft Photo Editor.lnk"

The same is true for Kermit. Example: Suppose a file is called "My File" and you want to make a copy of it called "Your File". You might expect:

  copy My File Your File

to work, but it doesn't, not in K95, and not at the Windows command prompt either: how is the command parser supposed to know where one name ends and the next one begins? Quoting is required:

  copy "My File" "Your File"


2.7. Multi-Purpose Fields

Many of K95's commands accept optional "switches", which are keywords that start with "/" ("forward slash"), for example:

  delete /list *.*

meaning "delete all files in the current directory and list their names as you delete them". But since the switches are optional, and you can give any number of them, K95 must also be prepared to let you type a filename instead of a switch.

If you type "delete ?", the response is:

  [C:\GUEST\] IKSD> del ? File specification;
   or switch, one of the following:
   /all       /directories   /larger-than: /noheading    /recursive
   /after:    /dotfiles      /list         /nolist       /simulate
   /ask       /except:       /noask        /not-after:   /smaller-than:
   /before:   /heading       /nodotfiles   /not-before:  /summary
  [C:\GUEST\] IKSD> del 

In other words, the available switches are listed. But what if you want to get a list of the filenames instead of a list of the available switches? Use this trick:

  [C:\GUEST\] IKSD> del ./? File(s) to delete, one of the following:
    (files are listed)

In other words, type "./" before the question mark, which means "current directory" (remember, we use forward slash as a directory separator in K95, not backslash). You could also type any other notation to let K95 know you want a file list, such as a disk letter ("delete c:?"), or any directory path ("del subdir/?", "del d:/tmp/?", etc) -- anything that does not begin with a slash (/), so it won't look like a switch.


2.8. Screen Formatting

WIKSD does no screen formatting at all: No clearing the screen, no cursor positioning, no sending escape sequences. Your Telnet client does not need to emulate any particular kind of terminal to use the Internet Kermit service.


2.9. Lots of Features

Kermit's file management features and other commands are many and varied; it would (and does) require a thick book to describe them all. If you would like to have a copy of the book (Using C-Kermit), purchase a copy of K95 yourself, or the book Using C-Kermit. Visit the Kermit website for details.

Many of the commands have to do with file transfer (discussed in Section 3) or script programming (Section 4).

Others have to do with customization. Chief among these are the SET and SHOW commands. The SET command is used to set preferences, and the SHOW command displays current settings. If you don't like how something works, chances are you can change it. Type "help set" and "help show" for an introduction.

Using just the information presented so far, you should be able make a connection to a Windows-based Internet Kermit server and perform all the file management tasks you could do in DOS, but more easily, since you always have help text, menu-on-demand, command recall, and keyword/filename completion at your fingertips.

[ Kermit 95 Home ] [ Kermit Home ]


3. TRANSFERRING FILES

[ Top ] [ Contents ] [ Next ] [ Previous ]

WIKSD / K95 is not just a DOS shell replacement; it can also transfer files over your Telnet connection using the Kermit protocol For this you need a Telnet client that includes a Kermit protocol implementation, and for best results it should also include Kermit autodownload and autoupload capability, as well as the Telnet Kermit Option (RFC2840). Examples:

  Autoup/download   Telnet Kermit Option
       Yes                  Yes            C-Kermit (Unix, VMS, etc)
       Yes                  Yes            Kermit 95 (Windows and OS/2)
       Yes                  No             MS-DOS Kermit (DOS and Windows 3.x)
       No                   No             Most other Telnet clients

Depending on the capabilities of your Telnet client and your access rights to the host PC, you can send or receive text or binary files in any mixture, singly or in groups.

If your Telnet client does not support Kermit protocol at all, the rest of this section is of no use to you. If it is not from the Kermit Project, it might support the Kermit protocol, but not well. Obviously, for best results we recommend a Kermit Project client, in which the protocol is full-featured and fast, and we can support both ends of the connection.


3.1. Sending Files from IKSD to Your Computer

To send (or "download") a file from IKSD to your computer, simply give a SEND command at the IKSD prompt for the desired file:

  [C:\GUEST\] IKSD> send oofa.txt

Hint: "send" can be abbreviated "s", even though other commands start with the letter S:

  [C:\GUEST\] IKSD> s oofa.txt

Don't worry about text or binary mode -- K95 figures it out automatically. If you want to force text or binary mode, however, you can use the /TEXT or /BINARY switch:

  [C:\GUEST\] IKSD> send /text oofa.txt
  [C:\GUEST\] IKSD> send /binary oofa.zip

Of course you can also send files from other disks or directories that you have access to:

  [C:\GUEST\] IKSD> send d:/tmp/oofa.txt

What happens next depends on your Telnet client. If it supports autodownload, the transfer begins automatically. Otherwise, you have to take whatever action your client requires to make it receive a file with Kermit protocol, and after the transfer is complete, you might have to tell your client to return to its terminal screen.

If you want to send a group of files, you can use "wildcards" in the file name, which are special characters such as "*" that match patterns in each file's name. The "*" character is most commonly used; it means "match any sequence of zero or more characters except period or slash". So to send all the files from the current directory, use:

  [C:\GUEST\] IKSD> send *.*

To send all the files whose names end with ".txt", use:

  [C:\GUEST\] IKSD> send *.txt

To send all the files whose names start with "a" and end with ".zip" in all subdirectories of the current directory, use

  [C:\GUEST\] IKSD> send */a*.zip

and so on. Lots of other wildcard possibilities are available too; type "help wildard" at the IKSD> prompt for details.

Wildcards give you one way of selecting files out of a group, but there are others too. You can get an idea by typing "send ?" at the IKSD> prompt to get a list of the available SEND options:

  [C:\GUEST\] IKSD> send ? Filename, or switch, one of the following:
   /after:     /delete        /listfile:    /not-before:  /recursive
   /array:     /dotfiles      /mail:        /pathnames:   /rename-to:
   /as-name:   /except:       /move-to:     /print:       /smaller-than:
   /before:    /filter:       /nobackup     /protocol:    /starting-at:
   /binary     /filenames:    /nodotfiles   /quiet        /subject:
   /command    /larger-than:  /not-after:   /recover      /text
  [C:\GUEST\] IKSD> send 

Of course you can use "help send" to get the details. As you can see, it is possible to construct a rather complex download, e.g. of all files whose names match a certain pattern, but only if they are a certain size, and/or were created before and/or after a certain date, and so on, and you can even include an exception list.

Also, in case you want to send several files whose names can't be selected by wildcards, you can use the MSEND command, which lets you give a list of filenames to send:

  [C:\GUEST\] IKSD> msend oofa.txt ../tmp/foo.zip *.c *.h

Note that the names are separated by spaces, not commas.

Don't worry about text- versus binary-mode tranfers; K95 automatically sends each file in the appropriate mode.


3.2. Sending Files from Your Computer to IKSD

Uploading files to IKSD can be just as easy, but that depends on your Telnet client. If it is Kermit 95 or C-Kermit, then just give a GET command to IKSD:

  [C:\GUEST\] IKSD> get oofa.txt

and your client sends the requested file or files automatically, each in the appropriate mode (text or binary). As with SEND, there is a wide range of options, which you can see by typing "get ?" or "help get".

For other clients, it's a bit more complicated:

  1. Tell IKSD to RECEIVE. This makes it passively wait for your Telnet client to send a file.

  2. Go back to your client's user interface ("escape back" or use its menu or toolbar or whatever other method is provided) and tell it to send the desired file or files in the required mode (text or binary) using Kermit protocol.

  3. After the transfer is finished, instruct your client to go back to its terminal screen if necessary.

[ Kermit 95 Home ] [ Kermit Home ]


4. CLIENT/SERVER

[ Top ] [ Contents ] [ Next ] [ Previous ]

Until now, we've treated WIKSD as an interactive shell. There's another way to use it, in which you interact only with your client, similar to the way you would use an FTP client. Obviously we can't document every client on earth, so in this section we'll stick with our own: Kermit 95, C-Kermit, and to some extent MS-DOS Kermit. No other Telnet clients are known (at this writing) to support RFC2839 and 2840.

When you make a client/server connection to an Internet Kermit service, your client does not enter its terminal screen, but rather stays in its command screen, and once connected, you simply give commands to your client; it passes them on to the server, which executes them and relays the result back to your client. To create such a connection, use the SET HOST command, rather than the TELNET or IKSD command:

  set host iks.kermit.columbia.edu kermit   (or 1649)

Authentication details are omitted, since they vary depending on the type of security, if any, negotiated between client and server. If, for example, you are in the same Kerberos realm as the server, and have a Kerberos identity in that realm, you are connected without supplying a username or password if you already have a ticket; otherwise you are prompted for them locally.

In the absence of any negotiated secure authentication methods, the client command for logging in is REMOTE LOGIN (or simply LOGIN in K95 and C-Kermit):

  remote login myusername mypassword

If you omit the username and password from the [ REMOTE ] LOGIN command, you are prompted for them separately, and the password does not echo:

  remote login
  Username: ivan
  Password:              

Once logged in, you can use SEND to upload files, GET to download them, and use the REMOTE command for assorted file management tasks:

  REMOTE CD [ directory ]        (RCD)     Change server directory
  REMOTE PWD                     (RPWD)    Print working server directory
  REMOTE DIRECTORY [ filespec ]  (RDIR)    Get a listing of server-side files
  REMOTE DELETE [ filespec ]     (RDEL)    Delete files on the server
  REMOTE TYPE [ filespec ]       (RTYPE)   Type (display) a server file
  REMOTE COPY [ file1 file2 ]    (RCOPY)   Make a copy of a server file
  REMOTE RENAME [ file1 file2 ]  (RREN)    Rename a server file
  REMOTE MKDIR [ directory ]     (RMKD)    Create a directory on the server
  REMOTE RMDIR [ directory ]     (RRMD)    Remove a directory on the server

and so on. Advanced usage includes REMOTE ASSIGN, REMOTE QUERY, and forth, to set and query server variables and call server-based procedures. When you are finished with the server, use the LOGOUT, BYE, CLOSE, or HANGUP command to disconnect.

[ Kermit 95 Home ] [ Kermit Home ]


5. AUTOMATION

[ Top ] [ Contents ] [ Next ] [ Previous ]

The Kermit script language is built naturally upon its interactive command language. A simple example of a script program is a file containing a series of Kermit commands. If you tell Kermit to TAKE the file, it executes the commands that are in it. However, for a program to be generally useful, it needs to operate on a variety of data -- e.g. to transfer different files at different times -- and so there needs to be a way to pass "parameters" to programs. Programs generally also need to make decisions based on the outcomes of the actions it takes, and they also often need to do something repetitively. Such programs require variables, control structures, grouping and scoping rules, arrays and other data structures, arithmetic, functions for processing strings and converting data, and so forth. K95 (WIKSD) has all of those, but it's beyond the scope of this short introduction to explain them; they are explained at length in the published manuals. The main thing to note here is that you can script your client to control the server (assuming your client is scriptable) or you can script the server itself, or any combination you can think of. For example, if you have write access to a directory on the IKSD, you can upload script programs to it and have it execute them. Or... a client-side script can send a macro definition to the server and have it execute the macro and return its result in a variable for further local processing.

You can find a Kermit script programming tutorial and lots of sample scripts here:

  http://www.columbia.edu/kermit/ckscripts.html

Scripted sessions with IKSD are especially easy, because everything is done with client-side commands -- there are no INPUT/OUTPUT sequences, no "screen scraping", etc. Matters become complicated when security is involved, since the script writer must know in advance exactly what forms of security are supported -- or required -- by the server, and what procedures and paramaters are involved to make a securely authenticated encrypted session.

Assuming an insecure version of WIKSD (such as the free IKSDNT program), here is an outline of a scripted session:

  set host xyzcorp.com kermit        ; Substitute the host of your choice
  if fail exit 1 Connection failed   ; Make sure connection worked
  remote login myuserid mypassword   ; Log in
  if fail exit 1 Login failed
  ; (file-transfer and -management commands here)
  bye

Obviously it's a bad idea to put passwords in files, so instead you can have the script prompt the user when the script starts:

  undefine pass	
  while not defined pass {
      askq pass { Password: }
  }
  set host xyzcorp.com kermit        ; Substitute the host of your choice
  if fail exit 1 Connection failed   ; Make sure connection worked
  remote login myuserid \m(pass)     ; Log in
  if fail exit 1 Login failed
  ; (file-transfer and -management commands here)
  bye

In case you have a security-capable Kermit client and a security-capable server, but you want to make a non-secure clear-text connection (e.g. on a local switched network, and/or for experimenting with script features without first having to become a security and cryptography expert), you can give the following commands to your client to disable its security features:

SET TELOPT AUTH REFUSED
This tells the client not to request any form of Telnet authentication and to refuse it if offered by the server. This prevents (for example) possible NTLM username / password popups, which wait for a response from the operator, thus halting progress of the script.

SET AUTHENTICATION TLS VERIFY OFF
This tells the client not to require certification of the host's authenticity. This eliminates certain kinds of prompts that are given for your own protection, but which can halt the progress of a script, such as:

  Warning: Server didn't provide a certificate, continue? (Y/N)

Use this command if the client and the server both support TLS security, but the required certificates are lacking (or, to put it another way, if you don't know what TLS is, but you get the above message, use this command to suppress it). This allows you to make an encrypted connection, but without assurrance that the host you are connecting to is the on you think it is.

(More to be filled in . . . )

[ Kermit 95 Home ] [ Kermit Home ]


6. APPLICATIONS AND EXAMPLES

[ Top ] [ Contents ] [ Previous ]

(To be filled in . . . )

[ Top ] [ Contents ] [ Kermit 95 Home ] [ Kermit Home ]


Windows Internet Kermit Service - User Guide / The Kermit Project / Columbia University / 4 June 2002