C-Kermit 8.0 Update Notes
[ Contents ]
[ C-Kermit ]
[ Kermit Home ]
For C-Kermit 8.0
As of C-Kermit version: 8.0.211
Date of C-Kermit release: 10 April 2003
This file last updated:
Tue Apr 12 09:13:18 2005
Authors: Frank da Cruz and Christine M. Gianone
Address: The Kermit Project
Columbia University
612 West 115th Street
New York NY 10025-7799
USA
Fax: +1 (212) 662-6442
E-Mail: kermit-support@columbia.edu
Web: http://www.columbia.edu/kermit/
Or: http://www.kermit-project.org/
Or: http://www.columbia.nyc.ny.us/kermit/
NOTICES
- This document:
- Copyright © 1997, 2002, Frank da Cruz and Christine M. Gianone.
All rights reserved.
- Kermit 95:
- Copyright © 1995, 2002, Trustees of Columbia University in the City of
New York. All rights reserved.
- C-Kermit:
- Copyright © 1985, 2002,
Trustees of Columbia University in the City of New York.
All rights reserved. See the C-Kermit COPYING.TXT file or the
copyright text in the
ckcmai.c
module for disclaimer and permissions.
- When Kerberos(TM) and/or SRP(TM) (Secure Remote Password) and/or SSL/TLS
protocol are included:
- Portions Copyright © 1990, Massachusetts Institute of Technology.
Portions Copyright © 1991, 1993 Regents of the University of California.
Portions Copyright © 1991, 1992, 1993, 1994, 1995 by AT&T.
Portions Copyright © 1997, Stanford University.
Portions Copyright © 1995-1997,
Eric Young <eay@cryptosoft.com>.
For the full text of the third-party copyright notices, see
Appendix V.
WHAT IS IN THIS FILE
This file lists changes made to C-Kermit
since version 7.0 was released in January 2000.
Use this file as a supplement to:
until the third edition of Using C-Kermit is published. We
apologize for the scattered documentation and will consolidate it when
we are able.
ADDITIONAL FILES
Several other files accompany this new Kermit release:
- ckututor.html
- C-Kermit Tutorial (for Unix). Also distributed in Nroff
form as
ckuker.nr,
the Unix C-Kermit manual page.
- security.htm
- Discussion of Kermit's new authentication and encryption features,
updated for C-Kermit 8.0.
- telnet.htm
- Detailed documentation of Kermit's Telnet client, updated for C-Kermit 8.0.
- ftpscripts.html
- Tutorial: Writing FTP automation scripts
- ckcbwr.html
- Platform-independent C-Kermit hints and tips. Also distributed in plain
text form as
ckcbwr.txt
- ckubwr.html
- Unix-specific C-Kermit hints and tips. Also distributed in plain
text form as
ckubwr.txt.
- ckvbwr.html
- VMS-specific C-Kermit hints and tips. Also distributed in plain
text form as
ckvbwr.txt.
- ckuins.html
- Unix C-Kermit installation instructions. Also distributed in plain
text form as
ckuins.txt.
- ckvins.html
- VMS C-Kermit installation instructions. Also distributed in plain
text form as
ckvins.txt.
- ckccfg.html
- Compile-time configuration options. Also distributed in plain
text form as
ckccfg.txt.
- ckcplm.html
- C-Kermit Program Logic Manual. Also distributed in plain
text form as
ckcplm.txt.
- iksd.html
- Internet Kermit Service Aministrators Guide for Unix.
- skermit.html
- C-Kermit as an SSH Subsystem (SFTP server replacement).
[ Top ]
[ C-Kermit ]
[ Kermit Home ]
0. WHAT'S NEW
1. FIXES SINCE VERSION 7.0.196
2. SSH AND HTTP
2.1. SSH Connections
2.2. HTTP Connections
2.2.1. HTTP Command Switches
2.2.2. HTTP Action Commands
2.2.3. HTTP Headers
2.2.4. Secure HTTP Connections
2.2.5. HTTP Variables
2.2.6. The HTTP Command-Line Personality
3. THE BUILT-IN FTP CLIENT
3.1. Making and Managing FTP Connections
3.1.1. Kermit Command-Line Options for FTP
3.1.2. The FTP Command-Line Personality
3.1.3. The FTP URL Interpreter
3.1.4. Interactive FTP Session Establishment
3.2. Making Secure FTP Connections
3.3. Setting FTP Preferences
3.4. Managing Directories and Files
3.5. Uploading Files With FTP
3.5.1. FTP PUT Switches
3.5.2. Update Mode
3.5.3. Recovery
3.6. Downloading Files With FTP
3.6.1. FTP GET Switches
3.6.2. Filename Collisions
3.6.3. Recovery
3.7. Translating Character Sets
3.7.1. Character Sets and Uploading
3.7.2. Character Sets and Downloading
3.8. FTP Command Shortcuts
3.9. Dual Sessions
3.10. Automating FTP Sessions
3.10.1. FTP-Specific Variables and Functions
3.10.2. Examples
3.10.3. Automating Secure FTP Connections
3.11. Advanced FTP Protocol Features
4. FILE SCANNING
5. FILE AND DIRECTORY NAMES CONTAINING SPACES
6. OTHER COMMAND PARSING IMPROVEMENTS
6.1. Grouping Macro Arguments
6.2. Directory and File Name Completion
6.3. Passing Arguments to Command Files
6.4. More-Prompting
6.5. Commas in Macro Definitions
6.6. Arrow Keys
7. NEW COMMANDS AND SWITCHES
8. SCRIPTING IMPROVEMENTS
8.1. Performance and Debugging
8.2. Using Macros as Numeric Variables
8.3. New IF Conditions
8.4. The ON_UNKNOWN_COMMAND and ON_CD Macros
8.5. The SHOW MACRO Command
8.6. Arrays
8.7. New or Improved Built-in Variables and Functions
8.8. The RETURN and END Commands
8.9. UNDEFINing Groups of Variables
8.10. The INPUT and MINPUT Commands
8.11. Learned Scripts
8.12. Pattern Matching
8.13. Dates and Times
8.14. Trapping Keyboard Interruption
9. S-EXPRESSIONS
9.1. What is an S-Expression?
9.2. Integer and Floating-Point-Arithmetic
9.3. How to Use S-Expressions
9.4. Summary of Built-in Constants and Operators
9.5. Variables
9.6. Assignments and Scope
9.7. Conditional Expressions
9.8. Extensibility
9.9. Examples
9.10. Differences from Algebraic Notation
9.11.Differences from Lisp
10. FILE TRANSFER
11. MODEMS AND DIALING
12. TERMINAL CONNECTION
13. CHARACTER SETS
14. DIALOUT FROM TELNET TERMINAL SERVERS
15. COPING WITH BROKEN KERMIT PARTNERS
16. NEW COMMAND-LINE OPTIONS
17. LOGS
[ Top ]
[ C-Kermit ]
[ Kermit Home ]
- The Initialization and Customization Files
- C-Kermit 8.0 now supports specification of the initialization file
name (path) in an environment variable, CKERMIT_INI. It also relies
far less than before on the initialization for functioning.
See Section 5 of
the Unix C-Kermit
installation instructions for details.
As of version 8.0.201, C-Kermit also executes your customization file (if
you have one) even if the initialization file was not found. Previously,
the customization file was executed by a TAKE command in the initialization
file (and it still is, if an initialization is found).
- Incompatible Changes
- As always, we do our best to avoid changes that break existing scripts.
However, C-Kermit 8.0 does include a rather pervasive syntax change that
might alter the behavior of scripts that depend on the previous behavior.
As described in Section 5, C-Kermit now accepts doublequotes
in most contexts where you previously had to use braces to group multiple
words into a single field, or to force inclusion of leading or trailing
blanks. Most noticeably, in C-Kermit 7.0 and earlier:
echo {this is a string}
would print:
this is a string
whereas:
echo "this is a string"
printed:
"this is a string"
In C-Kermit 8.0, both print:
this is a string
To force the doublequotes to be treated as part of the string, use either
of the following forms:
echo {"this is a string"}
echo ""this is a string""
Similarly, to force braces to be treated as part of the string:
echo "{this is a string}"
echo {{this is a string}}
Other incompatibilities:
- Using the SET HOST command to make HTTP connections is no longer
supported. Instead, use the new HTTP OPEN command, described
in Section 2.2.
- C-Kermit 7.1 Alpha.01 (8 December 2000)
- Its major new features are those listed in the
Table of Contents: the FTP client, file scanning,
command parsing and scripting improvements, S-Expressions, and support for the
Telnet Com Port Option, plus wider availability of the Kerberos, SSL/TLS, and
SRP security options for secure Internet connections.
- C-Kermit 7.1.199 Alpha.02 (4 January 2001)
-
- C-Kermit now accepts
FTP, TELNET, and IKSD URLs as its first command-line
argument.
- Character-set translation added to the FTP client for
filenames.
- Optional setting of date of incoming files by FTP
[M]GET from the server date.
- FTP CHECK filename added to let FTP client
check the existence of a file on the server.
- FTP GET /NAMELIST:filename added to get
list of server filenames into a local file.
- FTP [M]PUT /SERVER-RENAME:template added
to make server rename a file as indicated by the template after it has arrived
completely.
- FTP [M]GET /SERVER-RENAME:template added to make server rename
a file as indicated by the template after it has been sent completely.
- FTP VDIRECTORY added for getting verbose directory
listings from TOPS-20.
- FTP TYPE TENEX added for transferring 8-bit
binary files with PDP-10s.
- Added automatic text/binary mode switching
for FTP [M]GET, based on
filename patterns (e.g. *.zip, *.gz, *.exe
are binary; *.txt, *.c are text).
- SET SEND I-PACKETS OFF added for coping with Kermit
servers that do not support I packets.
- A new option was added to \fword() and
\fsplit() for parsing comma-separated lists that might contain
empty elements.
- Bug fixes including:
- {} or "" could not be used as expected to represent the
empty string.
- ,- on a line by itself in a macro definition caused subsequent
statements to be skipped.
- FTP [M]GET didn't work right if path segments were included in the filespec.
- FTP MGET, if interrupted, did not clear its file list.
- Various problems with FTP PUT /AS-NAME that nobody noticed.
- Some FTP messages and displays interfered with each other.
- Parsing of YESTERDAY, TODAY, and TOMORROW in date-time fields was broken.
- Automatic old-to-new dialing directory format conversion was broken on VMS.
- Various source-code portability problems fixed.
- Improvement of various HELP and SHOW messages.
- C-Kermit 7.1.199 Alpha.04 (1 April 2001)
-
- Big changes:
- Changed default modem type from NONE to GENERIC.
- Generic dialing now sends no init string at all.
- Changed default terminal bytesize from 7 to 8.
- New features:
- SET SESSION-LOG TIMESTAMPED-TEXT for timestamped session log.
- New modem types:
- Conexant modem family
- Lucent VENUS chipset
- PCTel V.90 chipset
- Zoom V.90
- Zoom V.92
- FTP client:
- FTP OPEN /PASSIVE and /ACTIVE switches added.
- Now works with servers that that don't include path in NLST response.
- Fixed SEND /RECURSIVE not to follow symlinks (UNIX).
- SET FTP VERBOSE-MODE default is now OFF instead of ON.
- Kermit protocol:
- Fixed what I hope is the last "Receive window full" error.
- SET PREFIXING or SET CONTROL PREFIX now
automatically sets CLEARCHANNEL OFF.
- Fixed incorrect report of number of files transferred at end of transfer.
- Fixed SEND /RECURSIVE not to follow symlinks (UNIX).
- UNIX:
- HTTP and shadow passwords enabled for SCO 5.0.6.
- Even with SET FILENAMES CONVERTED, spaces were still accepted in incoming
filenames; now they are converted to underscores.
- Added support for compile-time mktemp()/mkstemp() selection.
- VMS:
- Session-log format for scripted sessions fixed.
- Scripting:
- Fixed \frdir() not to follow symlinks (UNIX).
- Fixed \fday() not to dump core for dates prior to 17 Mar 1858.
- General:
- "Closing blah..." message upon exit could not be surpressed.
- Added /PAGE and /NOPAGE to DELETE switches.
- Added GO response for DELETE /ASK (delete all the rest without asking).
- Added GO response to "more?" prompt (for multi-page screen output).
- Updated HELP texts.
- C-Kermit 7.1.199 Beta.01 (10 May 2001)
-
- FTP client verbosity adjustments.
- Bug with generic modem dialing pausing several secs fixed.
- SET HOST /USER:, SET LOGIN USERID, etc, fixed when given no user ID.
- A couple \v(dm_blah) dial modifier variables added.
- "--version" command-line switch added.
- Fixed NetBSD serial-port DTR handling.
- Lots of syntax cleanups for Flexelint and gcc -Wall.
- Fixed modem-type aliases to not take precedence over real names.
- Fixed funny treatment of doublequotes by ECHO command.
- Enabled SET SESSION-LOG for VMS and other non-UNIX platorms.
- Fixed changing direction in command history buffer.
- Fixed handling of IKSD URLs.
- Made sure DELETE prints a message if it got any errors.
- C-Kermit 8.0.200 Beta.02 (28 June 2001)
-
- Major version number increased from 7 to 8.
- SSH command.
- More-consistent Kermit protocol defaults.
- CONNECT idle timeout and action selection.
- CONNECT status variable.
- A way to allocate more space for filename lists.
- Pseudoterminal handler fixed for late-model Linuxes.
- Command-line option -dd for timestamped debug log.
- Download directory now works for external protocols too.
- GREP /COUNT:variable.
- SET ATTRIBUTE RECORD-FORMAT { OFF, ON }.
- Bug fixes.
- C-Kermit 8.0.200 Beta.03 (9 Sep 2001)
-
- C-Kermit 8.0.200 Beta.04 (16 Nov 2001)
-
- New Unix man page
- New Unix installation instructions
- SET TELOPT policies are now enforced on non-Telnet ports if the
server begins Telnet negotiations.
- SET TERMINAL IDLE-ACTION { TELNET-NOP, TELNET-AYT }.
- UUCP lockfile creation race condition fixed.
- Dialout, modem signals, hangup, hardware flow control, etc, tested
extensively on many platforms, numerous problems fixed.
- Improved hints when dialing fails.
- SET STOP-BITS 2 can now be given without SET FLOW HARDWARE.
- Major improvements in RFC 2217 Telnet Com-Port Control.
- Improved ability to REDIAL a modem server port.
- kermit -h now shows the command name in the usage usage string.
- kermit -h now shows ALL command-line options.
- kermit -s blah, where blah is a symlink, now works.
- --noperms command-line option = SET ATTRIBUTE PERMISSIONS OFF.
- HTTP and HTTPS URLs now supported on the command line.
- An http command-line personality is now available.
- Initialization file streamlined to load faster, anachronisms removed.
- Updated NEWS, INTRO, HELP text, SHOW commands.
In particular, see SHOW COMM, HELP SET LINE, HELP WAIT.
- Date/time arithmetic routines converted from floating-point to integer
arithmetic (internally) for greater accuracy and portability.
- Quoted strings containing commas no longer break macro execution.
- Dynamic Kermit file-transfer timeouts are now much more aggressive.
- New "hot keys" to turn debug.log on/off during file transfer.
- Improved hints when file transfer fails.
- FTP CD orientation messages are now printed.
- -R now accepted on the FTP command line to request Recursion.
- -m allows Active or Passive mode to be chosen on the FTP command
line.
- -dd on the FTP command line creates a timestamped
debug.log.
- FTP command-line security options filled in.
- Improved automatic text/binary mode switching for MGET.
- Removed spurious error messages that sometimes occur during MGET.
- DIRECTORY, GREP, TYPE, HEAD, and TAIL now have a
/OUTPUT:file option.
- TYPE /NUMBER adds line numbers.
- CAT = TYPE /NOPAGE; MORE = TYPE /PAGE.
- GETOK ?-help fixed.
- \v(timestamp) (= "\v(ndate) \v(time)")
- \v(hour) (hour of the day, 0-23)
- \funix2dospath() converts a UNIX path (/) to a DOS one (\).
- \fdos2unixpath() converts a DOS (Windows, OS/2) path to a UNIX
one.
- \fkeywordval() parses name=value pair, allows macro keyword
parameters.
- We now make every attempt to not write passwords to the debug.log.
- New Certficate Authority certificates file, includes the Kermit
Project at Columbia University so you can access our IKSD securely.
- Secure targets improved and better documented in Unix makefile.
- All Linux (libc and glibc) builds consolidated under "make linux".
- HP-UX makefile targets now have consistent names.
- New aix50 and aix51 targets added.
- C-Kermit 8.0.200 Final (12 Dec 2001)
-
- Remote/local-mode confusion on some platforms introduced in Beta.04,
fixed.
- Many of the makefile targets adjusted, new ones added.
- New "make install" target should please most people.
- New command: SHOW IKSD.
- FTP over TLS.
- Last-minute touchups to text messages, HELP text, etc.
- Enable modem-signal reading for SCO OSR5 and Unixware 7.
- Special superfast TRANSMIT /BINARY /NOECHO /NOWAIT mode added.
- Fixed PBX dialing in unmarked-area-code case.
- Improved SHOW COMMUNICATIONS tells lockfile directory, typical
dialout device name.
- Some FTP OPEN command parsing problems fixed.
- Some errors in date arithmetic fixed.
- New command: SET TERMINAL AUTODOWNLOAD { ..., ERROR { STOP, CONTINUE } }
- New command: HELP FIREWALL.
- SET MODEM HANGUP-METHOD DTR added as synomym for RS232-SIGNAL
- Support for secure URL protocols added: telnets:, ftps:, https:.
- C-Kermit 8.0.201 (8 Feb 2002)
-
- C-Kermit 8.0.206 Beta.01 (11 Oct 2002)
-
- New commands:
- ORIENTATION lists location-related variables and their values.
- KCD changes to special directories by their symbolic names
("kcd ?" for a list).
- SET CD HOME path to specify home directory for CD and KCD commands.
- CONTINUE given at top level is equivalent to END -- handy when PROMPT'ed
out of a script, to continue the script.
- New switches or operands for existing commands:
- GETOK /TIMEOUT
- ASK, ASKQ, GETOK /QUIET (suppresses error message on timeout)
- COPY /APPEND now allows concatenating multiple source files into one
dest file.
- SET TCP { HTTP-PROXY, SOCKS-SERVER } /USER, /PASSWORD.
- DIRECTORY command now accepts multiple filespecs, e.g. "dir a b c".
- SET QUIET ON now also applies to:
- SET HOST connection progress messages.
- "Press the X or E key to cancel" file-transfer message.
- REMOTE CD response.
- REMOTE LOGIN response.
- Improvements and new features:
- Numerous FTP client fixes and new features, listed below.
- C-Kermit, when in remote mode at the end of a file transfer, now prints
a one-line "where" message. Control with SET TRANSFER REPORT.
- Unix makefile "install" target now creates an UNINSTALL script.
- Improved operation and performance on RFC 2217 Telnet connections.
- Improved CONNECT (interactive terminal connection) performance.
- HELP text updated for many commands.
- New or fixed makefile targets:
- Solaris 9 (several variations)
- Concurrent PowerMAX
- Mac OS X 10.2
- FreeBSD 1.0
- FreeBSD 4.6, 5.0
- AIX 5.2, 5.3
- Bugs fixed (general):
- Failure to run in VMS Batch fixed.
- LDIRECTORY fixed to run Kermit's built-in DIRECTORY command rather than
an external one.
- Fixed Solaris and other SVORPOSIX builds to find out their
full hostnames rather than just the "uname -n" name.
- Fixed some problems matching strings that start with ".".
- Fixed some problems matching pattern that contain {a,b,c} lists.
- Fixed erroneous reporting of text-mode reception as binary when sender
did not report the file size (cosmetic only).
- Many problems with SWITCH statements fixed.
- Fixed SET OPTIONS DIRECTORY /DOTFILES to work for server too.
- Fixed DELETE to print an error message if the file was not found.
- Fixed SET CONTROL UNPREFIX ALL and SET PREFIXING NONE to do the same thing.
- Fixed bugs executing macros from within the ON_EXIT macro.
- \fday() and \fnday() fixed for dates prior to 17 Nov
1858.
- Serial speed-changing bug in Linux fixed.
- "Unbalanced braces" script parsing errors when using
\{number} fixed.
- "if defined \v(name)" fixed to behave as described in the
book.
- Fixed Problems caused by LOCAL variables whose names are left substrings of
macro names.
- The INPUT command was fixed to honor the PARITY setting.
- Fixed bug with COPY to existing file that is longer than source file.
- REINPUT command failed to strip braces/quotes around its target string.
- Network directory lookups didn't work for SSH connections.
- REMOTE SET { FILE, TRANSFER } CHARACTER-SET fixed.
- Closed some holes whereby an incompletely received file was not deleted
when SET FILE INCOMPLETE is DISCARD, e.g. when the Kermit is hung up upon.
- SET XFER CHARACTER-SET TRANSPARENT fixed to do the same as SET XFER
TRANSLATION OFF.
- SET HOST PTY (e.g. SSH) connection fixed to pass along window-size changes.
- C-Kermit search path for TAKE files was accidentally disabled.
- FTP client bugs fixed:
- Character set translation was broken on little-endian (e.g. PC)
architectures.
- FTP PUT /SERVER-RENAME:, /RENAME-TO:, /MOVE-TO: switches were sticky.
- Make SET TRANSFER MODE MANUAL apply to FTP.
- Make SET FILE INCOMPLETE { KEEP, DISCARD } apply to FTP.
- FTP MGET /UPDATE handled equal times incorrectly.
- FTP MGET /RECOVER fixed to ignore file dates, use only size.
- FTP MGET /RECOVER sometimes downloaded files it didn't need to.
- FTP downloads with TRANSFER DISPLAY BRIEF could give misleading error
messages.
- FTP MGET temp file not deleted if FTP DEBUG set to OFF after it was ON.
- LOCUS not switched back when FTP connection is lost.
- Set incoming file date even if it was not completely received.
- FTP MGET sent SIZE and MDTM commands even when it didn't have to.
- FTP MGET sent SIZE and MDTM commands even when it knew they wouldn't work.
- FTP MGET failed if no files were selected for download.
- FTP MGET a* b* c* would fail to get any c*'s if no b*'s existed.
- Big problems canceling MGET with Ctrl-C.
- Some extraneous LOCUS dialogs squelched.
- Some inconsistencies in SET FTP FILENAMES AUTO fixed.
- Fixed file-descriptor pileup after multiple MGETs when using
mkstemp().
- Fixed "mget foo", where foo is a directory name.
- FTP improvements:
- New FTP protocol features added (FEAT, MLSD).
- FTP MGET /RECURSIVE now works as expected if server supports MLSD.
- FTP MGET /DATES-DIFFER to download if local and remote file dates differ.
- FTP DATES default changed to ON.
- FTP MPUT, MGET /EXCEPT now allows up to 64 patterns (up from 8).
- Top-level SITE and PASSIVE commands added for convenience.
- MGET /COLLISION:APPEND /AS-NAME:newfile *.* puts all remote files into one
local file.
- SET FTP SERVER-TIME-OFFSET for when server has wrong timezone set.
- Allow for alternative server interpretations of [M]MPUT /UNIQUE.
- SET FTP ANONOMOUS-PASSWORD lets you specify the default anonymous
password.
- Allow "GET /RECURSIVE path/file" to force local subdirectory creation.
- SET FTP DISPLAY is like SET TRANSFER DISPLAY but applies only to FTP.
- FTP { ENABLE, DISABLE } new-protocol-feature-name.
- FTP MGET /NODOTFILES.
- Debug log now records FTP commands and responses in grep-able format.
[ Top ]
[ Contents ]
[ C-Kermit ]
[ Kermit Home ]
First, the changes from 7.0.196 to 7.0.197... Source and makefile tweaks
to get successful builds on platforms that were not available in time for
the 7.0 release:
- 4.2BSD
- 4.3BSD
- AIX 4.3
- AT&T 3B2 and 3B20
- BeOS 4.5
- CLIX
- Interactive UNIX System V/386 R3.2 V4.1.1
- OS-9/68000
- OSF/1 1.3.
- PS/2 AIX 1.2.1
- SCO OSR5.0.x
- SCO Xenix 2.3.4
- SINIX 5.41/Intel
- Stratus FTX
- Stratus VOS
- SunOS 4.1 with X.25
- Ultrix 4.2
- Unixware 2.0
There were no functional changes from 196 to 197.
Fixes applied after C-Kermit 7.0.197 was released:
Source code: Big flexelint and "gcc -Wall" audit and cleanup.
Configuration:
- Solaris RTS/CTS (hardware flow control) didn't work.
- BSDI RTS/CTS worked only in one direction.
- FreeBSD 4.0 with ncurses 5.0 broke interactive command parsing.
- QNX-32 build lacked -DBIGBUFOK so couldn't execute big macros.
Connections:
- SET HOST /PTY didn't work on some platforms.
- Broken SET HOST /USER:xxx /PASSWORD:yyy /ACCOUNT:zzz switches fixed.
- Transparent printing was broken in Unix.
- ANSWER 0 (wait forever) didn't work.
- Some problems in Multitech modem command strings.
- Spurious "?Sorry, can't condition console terminal" errors.
- Disabling modem command strings by setting them to nothing broke dialing.
- SET DIAL TIMEOUT value was usually ignored.
- SET DIAL METHOD PULSE didn't work.
- Certain modem commands, if changed, not refreshed if modem type changed.
- SET SESSION-LOG command was missing from VMS.
- VMS session log format fixed for scripts.
- HANGUP by dropping DTR didn't work in NetBSD.
- SET FLOW /AUTO versus SET FLOW confusion fixed.
- Spurious secondary Solaris lockfile removed.
- SCO OSR5 DTR On/Off hangup.
- UUCP lockfile race condition.
Commands and scripts:
- Missing CAUTIOUS and FAST commands restored.
- Broken PTY command in late-model Linuxes fixed (API changed).
- Fixed off-by-one error in command recall when switching direction.
- Fixed recall of commands that contain '?'.
- COPY /SWAP-BYTES didn't work on some architectures.
- Various combinations of COPY switches didn't work.
- Various problems with COPY or RENAME with a directory name as target.
- SHIFT didn't decrement \v(argc) if used within IF, ELSE, or
SWITCH block.
- SHIFT didn't affect the \%* variable.
- Divide by zero improperly handled in some \function()s.
- Problems with RETURN from right-recursive functions.
- FSEEK /LINE \%c LAST didn't work if already at end.
- Some buffer vulnerabilities and potential memory leaks
were discovered and fixed.
- \frdirectory() fixed not to follow symbolic links.
- SET EXIT WARNING OFF fixed to work when EXIT given in a script.
- Missing DELETE and MKDIR error message fixed.
- \fday() core dump for ancient dates fixed.
File transfer:
- SEND /COMMAND was broken.
- CRECEIVE was broken (but RECEIVE /COMMAND was OK).
- Quoting wildcard chars in filenames didn't work.
- Problems canceling streaming file transfers with X or Z.
- Problems shifting between streaming and windowing file transfer.
- Non-FULL file-transfer displays erroneously said STREAMING when not.
- An active SEND-LIST prevented GET from working.
- SET SERVER GET-PATH interpretation of relative names like "." was
wrong.
- The MAIL command was broken.
- "kermit -s *" might have skipped some files.
- Transaction log entries were not made for external protocol transfers.
- File count report fixed to show number of files actually transferred.
- Fixed filename conversion to convert spaces to underscores.
- Made SET PREFIXING / SET CONTROL PREFIX also adjust CLEARCHANNEL.
- More "Receive window full" errors fixed.
- Broken terminal buffering after curses display in Solaris fixed.
- SET FILE INCOMPLETE DISCARD did not work in all cases.
- Packet log changed to reformat the start-of-packet character printably.
- Dynamic timeouts could grow ridiculously large.
Character sets:
- Hebrew-7 translations missed the letter Tav.
- C1 area of CP1252 was ignored.
- SET TRANSFER CHARACTER-SET TRANSPARENT could give garbage translations.
- TRANSLATE might not work on Little Endian architectures.
- Insufficient range checking in certain TRANSLATE operations.
The following bugs in C-Kermit 8.0.200
were fixed in 8.0.201:
- An obscure path through the code could cause the Unix version
of C-Kermit to dump core during its startup sequence. This happened
to only one person, but now it's fixed.
- When C-Kermit 8.0 is in Kermit server mode and the client says
"get blah", where blah (on the server) is a symlink rather than a real
file, the server unreasonably refused to send the linked-to file.
- When C-Kermit is an FTP client and says "get foo/bar" (i.e. a filename
that includes one or more path segments), it failed to accept the
incoming file (this happened only with GET, not MGET).
- Array references should be case insensitive but only lowercase array
letters were accepted.
- SHOW VARIABLES dumped core on \v(sexpression)
and \v(svalue).
- Spurious refusals of remote directory listings if the remote server's
date was set in the past.
- In AIX, and maybe elsewhere too, Kermit's COPY command always failed with
"Source and destination are the same file" when the destination file didn't
exist.
- The VMS version of C-Kermit did not work in Batch or when SPAWN'd.
To compound the problem, it also pretty much ignored the -B and -z
command-line options, whose purpose is to work around such problems.
- C-Kermit 8.0 could not be built on IRIX 5.x.
- The C-Kermit 8.0 build for QNX6 said it was an "(unknown version)".
Other fixes are listed in the previous section.
[ Top ]
[ Contents ]
[ C-Kermit ]
[ Kermit Home ]
This section does not apply to
Kermit 95 2.0, which has
its own built-in SSH client, which is documented
SEPARATELY.
On most UNIX platforms, C-Kermit can make SSH (Secure SHell) connection by
running the external SSH command or program through its pseudoterminal
interface. The command is:
- SSH text
- Tells Kermit to start the external SSH client, passing the given
text to it on the command line. Normally the text is just the
hostname, but it can be anything else that is acceptable to the ssh client.
If the command succeeds, the connection is made and Kermit automatically
enters CONNECT (terminal) mode. You can use the SSH command to make a
connection to any host that has an SSH server.
Kermit's SSH command gives you all the features of Kermit on an SSH
connection: command language, file transfer, character-set translation,
scripting, and all the rest. By default, C-Kermit invokes SSH with "-e
none", which disables the ssh escape character and makes the connection
transparent for purposes of file transfer. You can, however, change the SSH
invocation to whatever else you might need (an explicit path, additional
command-line arguments, etc) with:
- SET SSH COMMAND text
- Specifies the system command that Kermit's SSH command should use to
invoke the external SSH client. Use this command to supply a specific path or
alternative name, or to include different or more command-line options.
In most cases, these connections work quite well. They can be scripted like
any other connection, and file transfer goes as fast as, or faster than, on
a regular Telnet connection. In some cases, however, the underlying
pseudoterminal driver is a limiting factor, resulting in slow or failed
file transfers. Sometimes you can work around such problems by reducing the
Kermit packet length. Note that Kermit does not consider SSH connections to
be reliable, so it does not offer to use streaming in Kermit protocol
transfers (but you can force it with SET RELIABLE or SET STREAMING if you
wish).
The SSH command is like the TELNET command: it enters CONNECT mode
automatically when the connection is made. Therefore, to script an SSH
connection, use:
set host /pty ssh -e none [ other-options ] host
if fail ...
to make the connection.
Here's a sequence that can be used to make a connection to a given host
using Telnet if the host accepts it, otherwise SSH:
if not defined \%1 exit 1 Usage: \%0 host
set quiet on
set host \%1 23 /telnet
if fail {
set host /pty ssh -l \m(user) -e none \%1
if fail exit 1 \%1: Telnet and SSH both fail
echo SSH connection to \%1 successful
} else {
echo Telnet connection to \%1 successful
}
In SSH v2, it is possible to make an SSH connection direct to a Kermit server
system if the host administrator has configured the SSH server to allow this;
CLICK HERE for details.
Since Kermit uses external ssh client software, and since there are
different ssh clients (and different releases of each one), the exact command
to be used to make an SSH/Kermit connection can vary. Here is the command
for the OpenSSH 3.0.2p1 client:
set host /pipe ssh -e none [ -l username ] -T -s hostname kermit
Example:
set host /pipe ssh -e none -l olga -T -s hq.xyzcorp.com kermit
The SSH client might or might not prompt you for a password or other
information before it makes the connection; this depends on your SSH
configuration (your public and private keys, your authorized hosts file, etc).
Here's a brief synopsis of the OpenSSH client command syntax ("man ssh" for
details):
- -e none
- This tells the SSH client to use no escape character. Since we will be
transferring files across the connection, we don't want the connection
to suddenly block because some character in the data.
- -l username
- This is the username on the remote host. You can omit the -l
option and its argument if your local and remote usernames are the same. If
they are different, you must supply the remote username.
- -T
- This tells the SSH client to tell the SSH server not to allocate a
pseudoterminal. We are not making a terminal connection, we don't need a
terminal, and in fact if a terminal were allocated on the remote end, the
connection would not work.
- -s ... kermit
- This tells the SSH client to tell the SSH server to start the specified
subsystem ("kermit") once the connection is made. The subsystem name
comes after the hostname.
- hostname
- The IP host name or address of the desired host.
You might want to include other or additional ssh command-line options; "man
ssh" explains what they are. Here are some examples for the OpenSSH
3.0.2p1 client:
- -oClearAllForwardings yes
- -oForwardAgent no
- -oForwardX11 no
- -oFallbackToRsh no
- These ensure that a secure connection is used and that the connection
used for file transfer is not also used for forwarding other things
that might be specified in the ssh_config file.
- -oProtocol 2
- (i.e. SSH v2) Ensures that the negotiated protocol supports subsystems.
Once you have an SSH connection to a Kermit server, it's just like any other
connection to a Kermit server (and very similar to a connection to an FTP
server). You give the client file transfer and management commands for the
server, and the server executes them. Of course you can also give the client
any other commands you wish.
[ SSH Kermit Server Subsystem ]
[ Kermit 95 Built-in SSH Client ]
Hypertext Transfer Protocol, or HTTP, is the application protocol of the World
Wide Web (WWW), used between Web browsers (clients) and Web servers. It
allows a client to get files from websites, upload files to websites, delete
files from websites, get information about website directories and files, and
interact with server-side CGI scripts. C-Kermit includes an HTTP client
capable of both clear-text and secure HTTP connections, that can do all these
tasks and can be automated through the Kermit scripting language.
Although C-Kermit 7.0 could make HTTP connections to Web servers, it could do
so only when no other connection was open, and the procedure was somewhat
awkward. C-Kermit 8.0 improves matters by:
- Allowing an HTTP connection to be open at the same time as a regular SET
LINE or SET HOST connection, and also at the same time as an FTP connection
(Section 3);
- Upgrading the HTTP protocol level from 1.0 to 1.1, thus allowing for
persistent connections, in which a series of commands can be sent on the same
connection, rather than only one as in HTTP 1.0 (and C-Kermit 7.0);
- Providing for "one-shot" URL-driven HTTP operations such as GET or PUT.
- Providing a distinct HTTP command-line personality.
Persistent HTTP connections are managed with the following commands:
- HTTP [ switches ] OPEN
[ security-options ] host-or-url [ port ]
- Opens a persistent connection to the specified host (IP host name or
address) on the specified port. If any switches (options, listed in the next
section) are included, their values are saved and used for all subsequent HTTP
action commands on the same connection. If no port is specified, HTTP (80) is
used. A Uniform Resource Locator
(URL, RFC 1738) can be
given instead of a hostname (or address) and port (but the URL can not include
a directory/file path). The security options are explained
below. The HTTP OPEN command replaces the C-Kermit 7.0
SET HOST hostname HTTP command, which no longer works with
HTTP GET and related commands.
- HTTP CLOSE
- Closes any open HTTP connection and clears any saved switch values.
A URL starts with a protocol name, which must be
http or https in this case; optionally
includes a username and password; and must contain a host name or address:
protocol://[user[.password]]@host[:port][URI]
HTTP is Hypertext Transfer Protocol. HTTPS is the secure (SSL/TLS) version of
HTTP. The TCP service port is derived from the protocol prefix (so normally
the ":port" field is omitted). Thus the URL protocol name
specifies a default TCP service port and the URL user and
password fields can take the place of the /USER and
/PASSWORD switches (Section 2.2.1). The
optional URI is a "compact string of characters for identifying an abstract or
physical resource" (RFC
2396), such as a file. It must begin with a slash (/); if the
URI is omitted, "/" is supplied.
Examples:
- http open http://www.columbia.edu/
- Equivalent to http open www.columbia.edu
or http open www.columbia.edu http.
- http open https://olga.secret@www1.xyzcorp.com/
- Equivalent to
http /user:olga /pass:secret open www1.xyzcorp.com https.
Persistence is accomplished unilaterally by C-Kermit 8.0.
An HTTP 1.0 server closes the connection after each action. Although HTTP 1.1
allows multiple actions on the same connection, an HTTP 1.1 server tends to
close the connection if it is idle for more than a few seconds, to defend
itself against denial-of-service attacks. But when you use Kermit's HTTP OPEN
command to create a connection, Kermit reopens it automatically (if necessary)
for each HTTP action until you close it with HTTP CLOSE, regardless of the
server's HTTP protocol version, or how many times it closes the connection.
Firewalls can be negotiated through proxies with the following commands:
- SET TCP HTTP-PROXY [ host[:port] ]
- If a host (by hostname or IP address) is specified, Kermit uses it as a
proxy server when attempting outgoing TCP connections -- not only HTTP
connections, but all TCP/IP connections, Telnet and FTP included. This allows
Kermit to adapt to the HTTP firewall penetration method (as opposed to other
methods such as SOCKS4). If no hostname or ip-address is specified, any
previously specified Proxy server is removed. If no port number is specified,
the "http" service is used. This command must be given before the HTTP
OPEN command if a proxy is to be used or canceled.
- HTTP [ switches ]
CONNECT host[:port]
- Instructs the HTTP server to act as a proxy, establishing a connection to
the specified host (IP hostname or address) on the given port (80 = HTTP by
default) and to redirect all data transmitted between Kermit and itself to the
given host for the life of the connection. This command is to be used only
for debugging HTTP proxy connections. If a proxy connection is required,
instruct Kermit to use the proxy with the SET TCP
HTTP-PROXY command.
HTTP switches, like all other switches, are optional. When HTTP switches are
included with the HTTP OPEN command, they apply automatically to this and all
subsequent HTTP actions (GET, PUT, ...) on the same connection until an HTTP
CLOSE command is given. So if you include switches (or the equivalent URL
fields, such as user and password) in the HTTP OPEN command, you
can omit them from subsequent commands on the same connection. If the
connection has closed since your last command, it is automatically reopened
with the same options.
If you include switches with an HTTP action command (such as GET or PUT), they
apply only to that command.
- /USER:name
- To be used in case a page requires a username for access. The username is
sent with page requests. If it is given with the OPEN command it is saved
until needed. If a username is included in a URL, it overrides the username
given in the switch. CAUTION: Username and password (and all other
information, including credit card numbers and other material that you might
prefer to protect from public view) are sent across the network in clear text
on regular HTTP connections, but authentication is performed securely on HTTPS
connections.
- /PASSWORD:text
- To be used in case a web page requires a password for access. The
password is sent with page requests. If it is given with the OPEN command it
is saved until needed. If a password is given in a URL, it overrides the one
given here. CAUTION: (same as for /USER:).
- /AGENT:user-agent
- Identifies the client to the server. Overrides the default agent string,
which is "C-Kermit" (for C-Kermit) or "Kermit-95" (for Kermit 95).
- /ARRAY:array-designator
- Tells Kermit to store the response headers in the given array, one line
per element. The array need not be declared in advance. Example:
/array:&a.
- /TOSCREEN
- Tells Kermit to display any response text on the screen. It applies
independently of the output file specification; thus it is possible to have
the server response go to the screen, a file, both, or neither.
- /HEADER:header-item(s)
- Used for specifying any optional headers to be sent with HTTP requests.
/HEADER:tag:value
To send more than one header, use braces for grouping:
/HEADER:{{tag:value}{tag:value}...}
For a list of valid tags and value formats see
RFC 2616,
"Hypertext Transfer Protocol -- HTTP/1.1". A maximum of eight headers
may be specified.
HTTP actions can occur within a persistent connection, or they can be
self-contained ("connectionless"). A persistent HTTP connection
begins with an HTTP OPEN command, followed by zero or more HTTP action
commands, and is terminated with an HTTP CLOSE command:
http open www.columbia.edu
if failure stop 1 HTTP OPEN failed: \v(http_message)
http get kermit/index.html
if failure stop 1 HTTP GET failed: \v(http_message)
(more actions possible here...)
http close
A self-contained HTTP action occurs when a URL is given instead of a
remote file name to an HTTP action command. In this case, Kermit makes the
HTTP connection, takes the action, and then closes the connection. If an HTTP
connection was already open, it is closed silently and automatically.
http get http://www.columbia.edu/kermit/index.html
Kermit's HTTP action commands are as follows. Switches may be included with
any of these to override switch (or default) values given in the HTTP OPEN
command.
- HTTP [ switches ] GET remote-filename [ local-filename ]
- Retrieves the named file from the server specified in the most recent HTTP
OPEN command for which a corresponding HTTP CLOSE command has not been given.
The filename may not include wildcards (HTTP protocol does not support them).
If no HTTP OPEN command is in effect, this form of the HTTP GET command fails.
The default local filename is the same as the remote name, but with any
pathname stripped. For example, the command http get
kermit/index.html stores the file in the current local directory as
index.html. If the /HEADERS: switch is included,
information about the file is also stored in the specified array (explained in
Section 2.2.3). All files are transferred in binary
mode. HTTP does not provide for record-format or character-set conversion.
- HTTP [ switches ] GET url [ local-filename ]
- When HTTP GET is given a URL rather than a filename, Kermit opens a
connection to the designated server (closing any previously open HTTP
connection), gets the file, and then closes the connection. If the URL does
not include a filename, index.html is supplied. This is the
self-contained one-step "connectionless" method for getting a file from a Web
server. The data is not interpreted; HTTP GET is like "lynx -source"
rather than "lynx -dump".
In the remaining HTTP action commands, the distinction between a remote
filename and a URL are the same as in the HTTP GET command.
- HTTP [ switches ] HEAD remote-filename-or-url
[ local-filename ]
- Like GET except without actually getting the file; instead it retrieves
only the headers. If the /ARRAY: or /TOSCREEN switch is
included, there is no default local output filename but you can still specify
one. If neither of these switches is included, the default local filename is
the same as the remote filename, but with any path stripped and with
".head" appended. The HEAD command can be used in a script with the
/ARRAY: switch to retrieve information about the requested resource to
determine whether the resource should actually be retrieved with a subsequent
GET request.
- HTTP [ switches ] INDEX remote-directory-or-url
[ local-filename ]
- Asks the server to send a listing of the files in the given server
directory. This command is not supported by most Web servers. Even when it
is supported, there is no standard format for the listing.
- HTTP [ switches ] POST [
/MIME-TYPE:type ] source-file remote-path-or-url
[ result-file ]
-
Sends data to a process running on the remote host; the result is usually
an HTML file but could be anything.
The data to be
posted must be read from a local file (the source-file). If a result
file is specified, Kermit stores the server's response in it.
- HTTP [ switches ] PUT [
MIME-TYPE:type ] local-file [ remote-file-or-url
[ result-file ] ]
- Uploads a local file to the server. Only the name of a single file can be
given; wildcards (and group transfers) are not supported by HTTP protocol. If
no remote filename is given, the file is sent with the same name as the local
file, but with any pathname stripped.
- HTTP [ switches ] DELETE remote-file-or-url
[ local-result-file ]
- Asks the server to delete the specified single file. If a result file is
specified, it will contain any response data returned by the server.
Note the limitations of HTTP protocol compared to (say) FTP or Kermit. There
is no command for changing directories, no standard way to get file or
directory lists, no way to transfer file groups by using wildcard notation,
etc, and therefore no good way to (say) fetch all pages, descend through
subdirectories, perform automatic updates, etc. There is no assurrance a
connection will stay open and, as noted, there is no provision for data
conversion between unlike platforms. The data's MIME
headers can be used for postprocessing.
Each HTTP request and response contains a set of name/value pairs called
headers. HTTP headers are specified in
RFC 2616.
For example, an HTTP GET request for /index.html on
www.columbia.edu contains the following headers:
GET /index.html HTTP/1.1
Host: www.columbia.edu:80
User-agent: C-Kermit 8.0
Authorization: Basic base64-encoded-username-password
These might be followed by any others specified with a /HEADERS: switch:
Accept: image/gif, image/x-xbitmap, image/jpeg, *.*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,utf-8
Cookie: cookie-data
The server sends back a short report about the file prior to sending the file
contents. Example:
HTTP/1.1 200 OK
Date: Fri, 24 Aug 2001 21:09:39 GMT
Server: Apache/1.3.4 (Unix)
Last-Modified: Mon, 06 Aug 2001 21:16:13 GMT
ETag: "1fa137-10d7-3b6f091d"
Accept-Ranges: bytes
Content-Length: 4311
Content-Type: text/html
If you want to have this information available to a Kermit script you can use
the /ARRAY switch to have Kermit put it in array, one line per array
element. Example:
set exit warning off
http open www.columbia.edu
if fail exit 1 Can't reach server
http /array:&a get /index.html
if fail exit 1 Can't get file
echo Header lines: \fdim(&a)
for \%i 1 \fdim(&a) 1 {
echo \%i. \&a[\%i]
}
Note that the "Date:" item is the current date and time; the
"Last-Modifed:" item is the file's modification date and time. An
example showing how to use this information is presented in
Section 8.13.7.
SSL/TLS (Secure Sockets Layer / Transport Layer Security) is the
protocol used to secure HTTP, SMTP, and other Internet applications.
See the C-Kermit
Reference Section 5.4 for an introduction to SSL/TLS.
To make a secure HTTP connection, you need:
- A secure client (a version of C-Kermit or Kermit 95 with SSL/TLS security
built in). Type "check ssl" at the Kermit prompt to make sure you have it.
- A secure server to connect to.
- The CA Root Certificate used to authenticate the server to the client.
(see Section 15 of the security reference
for an introduction to certificates).
And you must make a connection to the secure HTTP port: service name HTTPS,
port number 443 (as opposed to service HTTP, port 80). You can also make
secure connections to other ports by including the /TLS or
/SSL switch with the HTTP OPEN command, if the host supports SSL/TLS
on the given port:
The quality of the SSL/TLS connection depends on the cipher suite.
There are several possibilities:
- Anonymous cipher suite:
- If an anonymous cipher suite is negotiated, the connection is
encrypted but there is no authentication. This connection is
subject to a Man-In-The-Middle (MITM) attack.
- X.509 certificate on the server:
- When you connect to certain secure servers, an X.509 certificate is
returned. This certificate is issued to a special hostname, something like
www1.xyzcorp.com or wwws.xyzcorp.com (rather than the normal
www.xyzcorp.com). It is signed by the host's Certificate Authority
(CA). If the host certificate is configured on the client, it can be used to
verify the certificate received from the server. If the certificate it
verified as authentic, a check is made to ensure it has not expired and it was
issued to the host you were attempting to connect to. If you had asked to
connect to (say) www.xyzcorp.com but were given a certificate for
www1.xyzcorp.com, you would be prompted for permission to continue.
If the verification succeeded, the connection would be encrypted
with one-way (server-to-client) authentication. This connection
is not subject to a MITM attack.
If a username and password are transmitted over this connection, they are not
subject to interception. However, the standard risks associated with passing
the password to the host for verification apply; for example, if the host has
been compromised, the password will be compromised.
- X.509 client certificate:
- If a connection has been established with an X.509 server certificate, the
server can ask the client to send a certificate of its own. This certificate
must be verified against a CA Root certificate. The certificate itself (or
subject info from the certificate) is used to determine the authorization for
the client, and if successful, the username and password need not be sent to
the server.
- Kerberos 5:
- Instead of using X.509 certifcates, Kerberos 5 can be used to perform the
authentication and key exchange. In this situation, there is mutual
authentication between the client and server. The Kerberos 5 principal is
used by the server to look up the appropriate authorization data. There is no
need to send username and password.
An HTTP connection is made with the HTTP OPEN command:
- HTTP [ switches ] OPEN
[ { /SSL, /TLS } ] host [ port ]
- If /SSL or /TLS switches are included (these are
synonyms), or if the service is HTTPS or the port is 443, a secure connection
is attempted using the current authentication settings; see HELP SET
AUTHENTICATION for details (Section 6.2 of
the security reference). If the no
/SSL or /TLS switch is included but the port is 443 or the
service is HTTPS, a secure connection is attempted. If an /SSL or
/TLS switch is included but a port is not specified, an SSL/TLS
connection is attempted on the default port (80).
Certificates are covered in the separate
Kermit Security
Reference for C-Kermit 8.0. You should let Kermit know to
verify certificates with the SET AUTHENTICATION TLS command. For example:
- SET AUTHENTICATION TLS CRL-DIR directory
- Specifies a directory that contains certificate revocation files where
each file is named by the hash of the certificate that has been revoked.
- SET AUTHENTICATION TLS CRL-FILE filename
- Specifies a file that contains a list of certificate revocations.
- SET AUTHENTICATION TLS VERIFY-DIR directory
- Specifies a directory that contains root CA certificate files used to
verify the certificate chains presented by the peer. Each file is named
by a hash of the certificate.
- SET AUTHENTICATION TLS VERIFY-FILE filename
- Specifies a file that contains root CA certificates to be used for
verifying certificate chains.
- SET AUTHENTICATION TLS VERIFY OFF
- Tells Kermit not to require a certificate and accept any certificate
that is presented regardless of whether it is valid.
There are many other options; see the security document for details.
Now suppose you need need to fetch the file denoted by the following URL:
https://myuserid:mypassword@wwws.xyzcorp.com/clients/info/secret.html
Once you have set up the handling of certificates as desired, you can
use the following Kermit commands:
http /user:myuserid /password:mypassword open www1.xyzcorp.com https
if success {
http get /clients/info/secret.html
http close
}
As another example, let's say that you have a web form you need to
populate with three fields: red,white and blue.
<FORM ACTION="http://www.xyzcorp.com/cgi-bin/form.cgi" METHOD="POST">
<INPUT NAME="Red">
<INPUT NAME="White">
<INPUT NAME="Blue">
</FORM>
You can handle this with the HTTP POST command. The data to be posted
is stored in the local file data.txt.
Red=seven stripes&White=six stripes&Blue=fifty stars
and the response from the server
will be stored into response.txt.
http open www.xyzcorp.com http
if success {
http /array:c post data.txt /cgi-bin/form.cgi response.txt
http close
}
In this scenario, the Common Gateway Interface (CGI) sends a
response whether it succeeds or fails in a script-dependent manner. The
script can either report success and enclose the response data; or it might
send a 302 Found error which indicates that the "Location:" header should be
used to determine the URL at which the data can be found.
- \v(http_code)
- The HTTP protocol code number of the most recent server reply,
e.g. 404 for "not found".
- \v(http_connected)
- 1 when an HTTP connection is open, 0 when there is no HTTP connection.
- \v(http_host)
- If an HTTP connection is open, the hostname:port, e.g.
www.columbia.edu:80; otherwise, empty.
- \v(http_message)
- Server error message, if any, from most recent HTTP command.
- \v(http_security)
- A list of the security parameters and values for the current connection,
if any. Empty if the connection is not to a secure server, or there is no
connection.
To display all the HTTP variables at once, type SHOW VAR HTTP:
C-Kermit> http open www.columbia.edu
C-Kermit> http get lkjlkjlkjlkj
C-Kermit> sho var http
\v(http_code) = 404
\v(http_connected) = 1
\v(http_host) = www.columbia.edu:80
\v(http_message) = Not Found
\v(http_security) = NULL
C-Kermit>
If you invoke C-Kermit with the name "http" or "https", you can use a special
set of HTTP-specific command-line options. You can do this by creating a
symbolic linke "http" or "https" to the C-Kermit 8.0 executable, or by having
a separate copy of it called "http" or "https". Here's the usage message
("http -h"):
Usage: ./http host [ options... ]
-h This message.
-d Debug to debug.log.
-S Stay (issue command prompt when done).
-Y Do not execute Kermit initialization file.
-q Quiet (suppress most messages).
-u name Username.
-P password Password.
-g pathname Get remote pathname.
-p pathname Put remote pathname.
-H pathname Head remote pathname.
-l pathname Local path for -g, -p, and -H.
-z opt[=value] Security options...
cert=file Client certificate file
certsok Accept all certificates
key=file Client private key file
secure Use SSL
verify=n 0 = none, 1 = peer , 2 = certificate required
The "host" argument is the name of a Web host, e.g.
www.columbia.edu. The action options are -p,
-g, and -H. If you give an action option, Kermit does
the action and then exits. If you give a host without an action option,
Kermit makes an HTTP connection to the host and then gives you the C-Kermit
prompt. Here's a simple example that fetches a publicly readable Web page:
http www.columbia.edu -g kermit/index.html
If you need to access a website for which a username and password are
required, you can supply them on the command line with -u and
-P. If you include a username but omit the password, Kermit
prompts you for it:
http www.columbia.edu -u olga -p kermit/index.html -l index.html
Password:
Note that when PUT'ing files to websites, you have to supply both the
-p (remote pathname) and -l (local path) options.
If your version of Kermit is built with SSL/TLS
security, you can also use the -z option to make secure HTTP
(https) connections.
Finally, as noted in Section 16, you can also give a URL
instead of a host name and options.
[ Top ]
[ Contents ]
[ C-Kermit Home ]
[ Kermit Home ]
3.1. Making and Managing FTP Connections
3.2. Making Secure FTP Connections
3.3. Setting FTP Preferences
3.4. Managing Directories and Files
3.5. Uploading Files With FTP
3.6. Downloading Files With FTP
3.7. Translating Character Sets
3.8. FTP Command Shortcuts
3.9. Dual Sessions
3.10. Automating FTP Sessions
3.11. Advanced FTP Protocol Features
Earlier versions of C-Kermit and K95 included an FTP command, but it simply
invoked an external FTP client. Now, by popular demand, Kermit includes its
own built-in FTP client that offers the following advantages over traditional
FTP clients (and its previous interface to them):
- Any of Kermit's built-in security methods can
be used to establish and conduct secure FTP sessions with FTP servers that support these methods.
(Security modules can be subject to export restrictions.)
- Kermit's FTP client uses "passive mode" by default to avoid blockage
by firewalls and network address translators.
Of course active mode can be chosen too when needed.
- Character sets
can be translated as part of the transfer process even when the FTP server
does not support character-set translation, including to/from the new Internet
standard international character set, Unicode UTF-8. This
includes both the file's name and (for text files only) its contents.
- All of C-Kermit's
file-selection mechanisms are available: size, date,
name patterns and lists, exception lists, etc.
- Atomic file
movement capabilities are provided (delete, move, or rename files
automatically after successful transfer).
- The correct file type, "ascii" (i.e. text) or binary,
is chosen automatically for each file (explained in Section
4), and any mixture of text and binary files can be sent in a single
operation, even across platforms.
- Update mode ("don't bother transferring files that didn't change since
last time") and recovery (resumption of an interrupted transfer from the
point of failure) are available in both directions.
- When uploading files from UNIX to UNIX, the file's permissions can be
preserved if desired.
- Recursive directory-tree PUTs are supported between any two platforms
that have tree-structured file systems. Recursive GETs are supported
between like platforms if the server cooperates
and between like or unlike platforms if the server supports
MLSD (Section 3.11).
- When receiving files, all of Kermit's file collision actions are
available: backup, update, refuse, rename, etc.
- Multi-file transfers can be interrupted on a per-file basis, automatically
skipping to the next file.
- FTP sessions are fully scriptable.
- An entire FTP session (connect, login, CD, upload or download, logout)
can be specified on the command line without using a script.
- All of Kermit's logging options and formats are available to keep an
accurate and complete record of each connection and file transfer, and
to aid in troubleshooting.
- All of Kermit's file-transfer display options are available (fullscreen,
brief, CRT, serial, none).
And best of all:
- Kermit doesn't give you those annoying per-file prompts every time you
start a multi-file transfer without remembering to give a "prompt"
command first :-).
[ Top ]
[ FTP Top ]
[ FTP Client Overview ]
[ FTP Script Tutorial ]
[ C-Kermit Home ]
[ Kermit Home ]
Each copy of Kermit can have one FTP connection open at a time. FTP
connections are independent of regular terminal connections; a terminal
connection (serial or network via SET LINE, DIAL, SET HOST, TELNET, etc) may
be, but need not be, open at the same time as an FTP connection, and terminal
connections can also be closed, and new connections opened, without
interfering with the FTP connection (and vice versa). Thus, for example,
Kermit can have an FTP connection and a TELNET connection open to the same
host simultaneously, using the TELNET connection (e.g.) to send mail or take
other desired actions as various FTP actions complete. Of course, each copy
of Kermit can do only one thing at a time, so it can't (for example) transfer
a file with FTP and another file with Kermit protocol simultaneously.
A Kermit FTP session can be established by
command-line options, by
URL, or by
interactive commands.
The new command-line option '-9' (sorry, we're out of letters) can be
used when starting C-Kermit, telling it to make an FTP connection:
kermit -9 hostname
or if a non-default FTP port is needed:
kermit -9 hostname:port
You can also specify the username on the command line with the -M
("My User ID") option that was already there for other connection types:
kermit -9 hostname -M olga
If you specify the username on the command line, Kermit uses it when making
the connection and does not prompt you for it (but it does prompt you for
the password if one is required).
Once the connection is made, you get the regular Kermit prompt, and can give
interactive commands such as the ones described below. When you give a BYE
command, Kermit closes the session and exits, just as a regular FTP client
would do. If you don't want Kermit to exit when you give a BYE command,
include the -S ("Stay") option on the command line.
Other Kermit command-line options that are not specific to non-FTP connections
should affect the FTP session in the expected ways; for example, -i
and -T force binary and text mode transfers, respectively.
File transfers can not be initiated on the "kermit -9"
command line; for that you need to use Kermit's FTP personality (next section)
or you can use URLs (Section 3.1.3).
If you want to replace your regular FTP client with C-Kermit, you can make
a link called "ftp" to the C-Kermit binary (or you can store a copy of the
C-Kermit binary under the name "ftp"). When C-Kermit is invoked with a
program name of "ftp" (or "FTP", case doesn't matter), it assumes the
command-line personality of the regular FTP client:
ftp [ options ] hostname [ port ]
In this case the options are like those of a regular FTP client:
-d Debug: enables debug messages and creates a debug.log file.
-n No autologin: Kermit should not send your user ID automatically.
-t Packet trace: accepted but is treated the same as -d.
-v Verbose: accepted but ignored (operation is verbose by default).
-i Not interactive: accepted but ignored.
and the hostname can also be a URL (explained in
Section 3.1.3). To specify a
non-default TCP port for the FTP server, include the port number or name after
the hostname.
There are also some bonus options that allow you to execute an entire FTP
session from the shell command line, as long as you don't include the
-n option. These are not available with regular FTP clients, and at
least one of these options (-g) conflicts with UNIX ftp (where
-g means "no globbing", which does not apply to Kermit), and some of
them (like the options above) also conflict with regular Kermit command-line
options:
-m mode = "passive" (default) or "active"
-Y Don't execute the Kermit initialization file [1]
-q Quiet, suppresses all but error messages [1]
-S Stay, don't exit automatically [1]
-A Autologin anonymously [2]
-u name Username for autologin [2] (synonym: -M [1])
-P password Password for autologin (see cautions below) [2]
-D directory cd after autologin [2]
-b Binary mode [2]
-a Text ("ascii") mode [2] (synonym: -T [1])
-R Recursive (works with -p) [4]
-p files Files to put (upload) after autologin [2] (synonym: -s [1])
-g files Files to get (download) after autologin [3]
[1] Same as Kermit, not available in regular FTP clients.
[2] Conflicts with Kermit, not available in regular FTP clients.
[3] Same as Kermit, conflicts with regular FTP clients.
[4] Conflicts with Kermit, available in some FTP clients.
Fancier options such as restart, character-set translation, filename collision
selection, automatic move/rename/delete, etc, are not available from the
command line; for these you can use the commands described in the following
sections. The -R option might also work with -g (GET) but
that depends on the server.
The following security options are also available, explained in
Section 3.2:
-k realm Kerberos 4 realm [4]
-f Kerberos 5 credentials forwarding [4]
-x autoencryption mode [4]
-c cipher SRP cipher type [4]
-H hash SRP encryption hash [4]
-z option Security options [4]
If you include -A or specify a name of "anonymous" or "ftp", you are
logged in anonymously and, in the absence of -P, Kermit automatically
supplies a password of "user@host", where "user" is
your local user ID, and "host" is the hostname of the computer where Kermit is
running. If you do not include -p or -g, Kermit enters
command mode so you can type commands or execute them from a script.
If you include -p or -g, Kermit attempts to transfer the
specified files and then exits automatically at the end of the transfer unless
you also included -S (Stay). It uses the "brief" file transfer
display (one line per file) unless you include the -q option to
suppress it.
When uploading files with -p, Kermit switches automatically between
text and binary mode for each file.
When downloading, you can either specify a particular mode (text or binary) to
be used for all the files, or you can let Kermit select the type for each file
automatically, based on its name (see Sections 3.5 and 3.6 for greater detail). In UNIX be sure to quote any
wildcard characters to prevent the shell from expanding them, as shown in the
examples just below. Filename collisions are handled according Kermit's FILE
COLLISION setting (if specified in your Kermit customization file; otherwise
the default, which is BACKUP).
It should go without saying that the -P option
should be used with caution. In addition to the well-known risks of
transmitting plaintext passwords over the Internet, in this case the password
also echos to the screen if you type it, and can be seen in ps and
w listings that show the user's currently active command and
command-line arguments. Thus command-line FTP sessions are most appropriate
for secure or anonymous connections (those that do not require passwords).
Here's an example in which you download the latest C-Kermit "tarball" from
the Columbia University FTP archive:
ftp -A kermit.columbia.edu -bg kermit/archives/ckermit.tar.gz
This assumes that "ftp" is a symbolic link to C-Kermit. It logs you in
anonymously and gets the ckermit.tar.gz file in binary mode from the
kermit/archives directory.
Here's a slightly more ambitious example that illustrates CD'ing to the
desired server directory to get a group of files in text mode (in this case
the C-Kermit source files):
ftp -A kermit.columbia.edu -D kermit/f -ag "ck[cuw]*.[cwh]" makefile
In this case we CD to the kermit/f directory so we don't have to
include it in each file specification, and we quote the
ck[cuw]*.[cwh] specification so the shell doesn't expand it, since we
have to pass it as-is to the server. Note also that the quotes don't go
around the entire file list; only around each file specification that needs to
be quoted.
Here's one more example, that uploads a debug log file in binary mode to the
Kermit incoming directory (as we might ask you to do when following up on a
problem report):
ftp -A kermit.columbia.edu -D kermit/incoming -bp debug.log
In this case the -D option is required to tell the server where to
put the incoming file.
Unless the -Y option is included, your Kermit initialization file
(.mykermrc in UNIX, K95.INI in Windows) is executed before
the command line options, so you can set any FTP-related preferences there, as
described in the subsequent sections.
- If Kermit is invoked with either its regular personality (as "kermit")
or its FTP personality (as "ftp"), you can also give a URL
(Universal Resource Locator) instead of a hostname and options, with or
without a username and password:
- ftp ftp://user:password@host/path
ftp ftp://user@host/path
ftp ftp://@host/path (or
ftp://:@host/path)
ftp ftp://host/path
kermit ftp://host/path
If the FTP personality is used,
the service must be "ftp". In all cases,
a hostname or address must be included. If a
user is included but no password, you are prompted for the password. If a
path (filename) is included:
- If "@" is included without a user, Kermit
prompts for the username and password.
- If no user
and no "@" are included, "anonymous" is used.
- GET is assumed.
- If no path (and no action options) are included, an interactive FTP
session is started, as in this example:
- ftp ftp://kermit.columbia.edu
If a path is included, but a username is not included, "anonymous" is used and
an appropriate user@host password is supplied
automatically. If authentication is successful, Kermit attempts to GET the
file indicated by the path or, if the path is the name of a directory, it asks
the server for a directory listing. In both cases, Kermit disconnects from
the server and exits after the operation is complete (unless you have included
the -S option on the command line).
- Here's an example that gets a listing of the Kermit directory at the
Kermit ftp site:
- ftp ftp://kermit.columbia.edu/kermit/
- This example gets the top-level READ.ME file from the same directory:
- ftp ftp://kermit.columbia.edu/kermit/READ.ME
- Here's the same example, but requesting a text-mode transfer:
- ftp -T ftp://kermit.columbia.edu/kermit/READ.ME
This illustrates that you can mix command-line options and URLs if you desire.
- Here's an example that logs in as a (fictitious) real user to get a file:
- ftp ftp://olga@ftp.xyzcorp.com/resume.txt
The password is not included, so Kermit prompts for it.
This scheme allows Kermit to be used as the FTP helper of other applications,
such as Web browsers, with all its advantages over other FTP clients
(especially the ones that are built in to most Web browsers), e.g. that it
can be given wildcards, and it can pick text and binary mode automatically
for each file.
HINT: suppose somebody sends you an FTP URL in email, or you see it in
some text. If your terminal screen supports copy/paste, copy the url,
and then at the shell prompt type "kermit", a space, and then paste the
URL, e.g.:
$ kermit ftp://alpha.greenie.net/pub/mgetty/source/1.1/mgetty1.1.27-O
"$ is the shell prompt; the part you type is underlined, the rest
is pasted in. Kermit does the rest.
As you read this and the following sections, bear in mind that any command
that can be given at the prompt can also be used in a script program.
Kermit's script programming language is the same as its interactive command
language. CLICK
HERE if you would like to learn a bit more about script writing.
An FTP session is established with the FTP OPEN command:
- FTP [ OPEN ]
[ { /SSL, /TLS } ]
hostname [ switches ] [ port ]
- Opens an FTP connection to the given host on the given port and, if FTP
AUTOLOGIN is ON, also logs you in to the server, prompting for username and
password if necessary. If no port is specified, the regular FTP protocol
port (21) is used. The OPEN keyword is optional (unless the hostname
conflicts with one of the FTP command keywords, which you can list
by typing "ftp ?").
The hostname can be an IP host name, numeric IP address, or if you have a
network directory active (SET NETWORK DIRECTORY; see Chapter 6 of
Using C-Kermit), an
entry name in the directory. In the latter case, if the given hostname
matches exactly one entry, the associated name or address is used; if it
matches more than one, Kermit cycles through them until one is found that can
be opened; if it matches none, then the hostname is used as-is. If a
directory is active but you want to bypass directory lookup, include an "="
sign at the beginning of the hostname, and/or use a numeric IP address.
When an FTP connection is opened, the default file-transfer mode is set to
binary if the client and server platforms are alike (e.g. both of them are
some kind of UNIX), and to text ("ascii") if they are not alike. This has
no particular effect for uploading since Kermit automatically switches between
text and binary mode for each file, but might be important for downloading.
The connection is also set to Stream mode and File structure. Record- or
page-oriented file transfers are not supported by C-Kermit's FTP client.
The optional FTP OPEN switches are:
- /ANONYMOUS
- Logs you in anonymously, automatically supplying username "anonymous"
and user@host as the password, based on your local user and
host names.
- /NOLOGIN
- Overrides SET FTP AUTOLOGIN ON for this connection only.
- /USER:name
- Uses the given username to log you in, thus avoiding the Name: prompt.
- Overrides SET FTP AUTOLOGIN OFF for this connection only.
- /PASSWORD:text
- Uses the given text as your password, thus avoiding the Password: prompt.
This switch is not recommended for use in script files, which would be a
security risk.
- /ACCOUNT:text
- Uses the given text as your account (or secondary password, depending on
the requirements of the server; most servers do not require or accept an
account name). If an account is not supplied, you are not prompted for
one.
- /PASSIVE
- Opens the connection in passive mode. Passive mode is the default in
Kermit's FTP client, unlike in most others, since it works better through
firewalls. The /PASSIVE and /ACTIVE switches apply only
to the connection that is being opened, and do not affect the global
FTP PASSIVE-MODE setting.
- /ACTIVE
- Opens the connection in active mode. Use this switch if the server does
not support passive mode, or use the command SET FTP PASSIVE-MODE OFF.
- /NOINIT
- Added in C-Kermit 8.0.201. Tells C-Kermit not to send
REST, STRU, FEAT, and MODE commands to the server
when the connection is opened, since these have been reported to cause
confusion in certain servers.
When a username or password is missing, a prompt is issued at the controlling
terminal and you must type the response; the response can not be scripted.
Use the switches to avoid prompts, or one of the secure authentication methods
described in the next section, or see
SET FTP AUTOLOGIN and the
FTP USER
and similar commands described later in this section.
Examples:
ftp open kermit.columbia.edu /anonymous ; Open and log in anonymously
ftp kermit.columbia.edu /anonymous ; The OPEN keyword can be omitted
ftp xyzcorp.com ; Open and maybe prompt for username
ftp xyzcorp.com /user:olga ; Open and log in as olga
ftp testing.abccorp.com 449 ; Specify a special TCP port number
ftp testing.abccorp.com /user:olaf /password:secret 449
The FTP OPEN command succeeds if a connection was opened to the server (even
if the given username and password were not valid) and fails otherwise (see
Section 3.8 for details).
When your FTP session is complete, you can terminate it as follows:
- FTP BYE
- Closes the FTP connection if one was open.
The FTP prefix can be omitted if no other connection is open at the same time
(see Section 3.8 for details). If a
connection log is active, an FTP record is written to it. If Kermit was
started with the -9 command-line option or with its FTP command-line
personality, and the -S (Stay) option was not given, AND there is no
other active connection, the FTP BYE command also exits, just as it does on a
regular FTP client. Synonyms: FTP CLOSE,
FTP QUIT (but if the FTP prefix is omitted from QUIT, this
becomes the regular Kermit QUIT command, which is equivalent to EXIT; i.e.
it closes the connection and exits from Kermit).
The following commands can be used to achieve greater control over the
connection and login process:
- SET FTP ANONYMOUS-PASSWORD
text
- Allows you to choose the password text to be sent
automatically by Kermit when you open an FTP connection with the /ANONYMOUS
switch.
- SET FTP AUTOLOGIN
{ ON, OFF }
- If you give this command prior to opening an FTP connection, it controls
whether Kermit tries to log you in automatically as part of the connection
process. Normally ON, which means the username and password are sent
automatically (and prompted for if they are not yet known). When OFF, FTP
OPEN connects to the server without logging in. OFF is equivalent to the
-n command-line option when using Kermit's FTP command-line
personality.
- FTP USER name [ password [ account ] ]
- Used to log in to an FTP server to which a connection has been made without
autologin, or when autologin failed. If the password is furnished on the
command line, it is used; otherwise you are prompted for a password. An
account may also be furnished if required by the server; it is not required
by Kermit and is not prompted for if omitted. Synonyms:
USER, FTP LOGIN.
- FTP ACCOUNT text
- Sends an account name to a server that supports accounts. If the server
does not support accounts, an error response occurs. If the server does
support accounts, the account is accepted if it is valid and rejected if
it is not. The account might be used for charging purposes or it might
be a secondary password, or it might be used for any other purpose, such
as an access password for a particular disk. Servers that support
accounts might or might not allow or require the account to be sent
prior to login; usually it is sent after login, if at all.
Synonym: ACCOUNT.
Example:
set ftp autologin off ; One thing at a time please
ftp xyzcorp.com ; Try to make the connection
if fail exit 1 FTP connection failed ; Check that it was made
ftp user olga secret ; Now log in to the server
if fail exit 1 FTP login failed ; Check that it worked
ftp account 103896854 ; Login OK - send account
if fail echo WARNING - FTP ACCT failed ; Warn if problem
... ; (have session here)
bye ; Log out and disconnect
The following commands are used to control or get information about the FTP
connection. Any particular FTP server does not necessarily support all of
them.
- FTP RESET
- Terminates a user session but leaves the connection open, allowing a new
login via FTP USER.
- FTP IDLE [ number ]
- Most FTP servers automatically log you out and and disconnect your session
if there has been no activity for a certain amount of time. Use this
command to ask the server to set its idle limit to the given number of
seconds. Omit the number to ask the server to inform you of its current
idle limit.
- FTP STATUS [ filename ]
- Asks the FTP server to send information about the current session.
The result is a free-format report that might include server
identification, username and login time, FTP protocol settings, and
file-transfer statistics. If a filename is given, the server is supposed to
send detailed information about the file.
- FTP SYSTEM
- Asks the FTP server to identify its operating system (Listed in Internet
Assigned Numbers, Operating System Names). Examples: UNIX, VMS, VM/CMS,
WINDOWS-NT. Unfortunately many variations are allowed (e.g. LINUX-2.0,
LINUX-2.2, FREEBSD, ULTRIX, etc, instead of UNIX; WINDOWS-NT-3,
WINDOWS-NT-3.5, WINDOWS-NT-3.51, WINDOWS-NT-4, etc). The report might
also include other information like "Type L8", "Type I", or "Type A",
indicating the file-transfer mode.
- FTP HELP [ keyword [ keyword [ ... ] ]
- Asks the server to list the commands it supports. The response is usually
cryptic, listing FTP command mnemonics, not the commands used by the client
(since the server has no way of knowing anything about the client's user
interface). For example, the PUT command is STOR in FTP protocol. If a
keyword is given, which should be an FTP protocol command, slightly-more-
detailed help is given about the corresponding command (if the FTP server
supports this feature). Examples: "ftp help", "ftp help stor".
- FTP SITE text
- (Advanced) Sends an FTP SITE (site-specific) command. Usually this means
that the FTP server is asked to run an external command with the given
arguments. You might be able to find out what SITE commands are available
by sending "ftp help site" to the server, but in general the availability
of and response to SITE commands is (not surprisingly) site specific.
- FTP QUOTE text
- (Advanced) Sends an FTP command in FTP protocol format. Use this command
to send commands to the server that the FTP client might not know about.
- SHOW FTP
- Lists client (Kermit) FTP settings and information.
Also SHOW CONNECTION, SHOW COMMUNICATIONS.
- HELP FTP [ keyword ]
- Asks Kermit to list and describe its built-in FTP commands.
- HELP SET FTP [ keyword ]
- Asks Kermit to list and describe its built-in SET FTP commands.
[ Top ]
[ FTP Top ]
[ C-Kermit Home ]
[ Kermit Home ]
Also see:
Accessing IBM Information
Exchange with Kermit.
In the previous section, you can see several examples of traditional insecure
authentication: username and password sent across the network in clear text.
Of course this is bad practice on at least two counts: (1) storing
passwords in files (such as script files) gives access to the target systems
to anybody who can obtain read access to your scripts; and (2) sending
this information over the network leaves it open to interception by network
sniffers or compromised hosts.
Because of the increasing need for security on the Internet, FTP servers are
beginning to appear that offer secure forms of authentication, in which no
information is sent over the network that would allow anyone who intercepts
it to usurp your identity and gain your access rights.
Kermit provides an equivalent form of FTP security for each type of IETF
standard security implemented in Telnet. These include GSSAPI-KERBEROS5,
KERBEROS4, Secure Remote Password (SRP), and Transport Layer Security (SSL and
TLS). It does not presently include SSL tunneling nor any form of SSH v1 or
v2. When Kermit is built with the necessary libraries, secure FTP connections
are attempted by default, in which all connections are authenticated and the
command and data channels are private.
The use of authentication and encryption for FTP connections can be
adjusted with the commands listed below, which are available only if your
version of Kermit was built with the corresponding security options and
libraries:
- SET FTP AUTHTYPE
{ AUTOMATIC, GSSAPI-KRB5, KERBEROS4, SRP, SSL, TLS }
- Specifies an ordered list of authentication methods to be attempted when
AUTOAUTHENTICATION is ON. The default list is: GSSAPI-KRB5, SRP,
KERBEROS_V4, TLS, SSL. If none of the selected methods are supported by
the server, an insecure login is used as a fallback. Note, by the way,
that SSL or TLS can be used to secure an anonymous connection.
- SET FTP AUTOAUTHENTICATION { ON, OFF }
- Tells whether authentication should be negotiated by the FTP OPEN command.
Default is ON. Use SET FTP AUTOAUTHENTICATION OFF to force a clear-text,
unencrypted connection to FTP servers (such as the one at the Kermit FTP site)
that normally would try to negotiate secure authentication and encryption.
- SET FTP AUTOENCRYPTION
{ ON, OFF }
- Tells whether encryption (privacy) should be negotiated by the FTP OPEN
command, which can happen only if secure authentication is also negotiated.
Default is ON.
- SET FTP AUTOLOGIN { ON, OFF }
- Tells Kermit whether to try logging in automatically when you make an
FTP connection, as opposed to letting you do it "by hand" with the FTP USER
command.
- SET FTP COMMAND-PROTECTION-LEVEL
{ CLEAR, CONFIDENTIAL, PRIVATE, SAFE }
- Determines the level of protection applied to the command channel:
CLEAR Data is sent in plaintext and not protected against tampering.
CONFIDENTIAL Data is encrypted but not protected against tampering.
PRIVATE Data is encrypted and is protected against tampering.
SAFE Data is sent in plaintext but protected against tampering.
The default is PRIVATE.
- SET FTP CREDENTIAL-FORWARDING { ON, OFF }
- Tells whether end-user credentials are to be forwarded to the server if
supported by the authentication method (GSSAPI-KRB5 only). This is often
required to allow access to distributed file systems (e.g. AFS.)
- SET FTP DATA-PROTECTION-LEVEL { CLEAR, CONFIDENTIAL, PRIVATE, SAFE }
- Tells what level of protection is applied to subsequent data channels.
The meanings of the protection-level keywords are the same as for
SET FTP COMMAND-PROTECTION-LEVEL. The default is PRIVATE.
- SET FTP SRP CIPHER name
- Specifies the cipher to be used for encryption when SRP authentication
is in use. The list of possible choices is computed based on the
capabilities of the local SRP library and includes NONE plus zero or
more of the following:
BLOWFISH_ECB CAST5_ECB DES_ECB DES3_ECB
BLOWFISH_CBC CAST5_CBC DES_CBC DES3_CBC
BLOWFISH_CFB64 CAST5_CFB64 DES_CFB64 DES3_CFB64
BLOWFISH_OFB64 CAST5_OFB64 DES_OFB64 DES3_OFB64
The default is DES3_ECB.
- SET FTP SRP HASH name
- Specifies the hash to be used for data protection when SRP authentication
is in use. The choices are MD5 and SHA. The default is SHA.
Command-line options:
- -k name
- Specifies the realm to be used with Kerberos 4 authentication
(= SET AUTH K4 REALM name).
- -f
- Enables forwarding of Kerberos 5 credentials to the host when using
GSSAPI authentication (= SET AUTH K5 FORWARDABLE ON).
- -x
- Enables autoencryption (= SET FTP AUTOENCRYPTION ON).
- -c cipher
- Specifies the kind of cipher to be used for encryption with SRP
authentication. Equivalent to SET FTP SRP CIPHER, with the same
choices. If this option is not given, CAST5_CBC is used.
- -H hash
- Specifies the hash to be used for encryption with SRP authentication.
Equivalent to SET FTP SRP HASH, with the same choices. If this option
is not given, SHA is used.
- -z debug
- Turns on SSL/TLS debugging.
- -z secure
- Requires secure connection.
- -z certsok
- Says to accept all certificates without checking validity.
- -z verify=n
- Sets certificate verification mode to the given number, n:
0 = no verification
1 = verify certificate if presented
2 = require verification of certificate
- -z cert=filename
- Specifies a file containing a client certificate to be presented to the
FTP server.
- -z key=filename
- Specifies a file containing a private key matching the client certificate.
- -z !krb4
- (nokrb4) Disables the use of Kerberos 4.
- -z !gss
- -z nogss
- Disables the use of GSSAPI - Kerberos 5.
- -z !srp
- -z nosrp
- Disables use of SRP.
- -z !ssl
- -z nossl
- Disables the use of SSL.
- -z !tls
- -z notls
- Disables the use of TLS.
Caution: If your FTP connection is secured via AUTH TLS,
it is not possible to interrupt a file transfer. This is a limitation of
all known FTP servers that support AUTH TLS.
Note that when using certain security methods, such as SSL or TLS, you
may be prompted to confirm or verify certain actions or conditions, for
example, whether to accept self-signed certificates. This can interfere
with unattended operation of scripts; see
Section 3.10.
[ Top ]
[ FTP Top ]
[ C-Kermit Home ]
[ Kermit Home ]
FTP preferences can be set globally and persistently with the commands in the
following sections; many of these can also be overridden on a per-command
basis with switches that have the same name.
3.3.1. Logs, Messages, and Other Feedback
You can control the amount of feedback received from your FTP session with
the commands in this section. First, you can create a log of your FTP
transfers with the following commands:
- SET TRANSACTION-LOG { VERBOSE, FTP, BRIEF
}
- Selects the log format. VERBOSE is the default, and is described in
the
manual. FTP chooses a WU-FTPD format, the same as is used by the popular
FTP server. BRIEF creates per-file records in comma-separated-list format.
For greater detail, see
Section 4.17
of the
C-Kermit 7.0 Update
Notes.
- LOG TRANSACTIONS filename
- Records FTP (or Kermit, or any other protocol) uploads and downloads
in the given file using the format selected by the most recent
SET TRANSACTION-LOG command, if any, or else the default format.
FTP screen messages and displays are controlled by the following commands:
- SET TRANSFER DISPLAY { FULLSCREEN, CRT, SERIAL,
BRIEF, NONE, OFF }
- FTP transfers use Kermit's normal file-transfer display styles. Use this
command to choose the desired format; the default on most platforms is
FULLSCREEN. The display is automatically disabled if Kermit is running in
the background or in batch. BRIEF is always used for command-line initiated
transfers (unless suppressed by -q).
While a file-transfer is in progress, you can interrupt it in the normal
Kermit way by typing one of the following keys or key combinations:
X - Cancel current file but go on to the next one (if any).
Z - Cancel the entire transfer.
Ctrl-L or Ctrl-W - Refresh the file-transfer display (if any).
- SET FTP DISPLAY
{ FULLSCREEN, CRT, SERIAL,
BRIEF, NONE, OFF }
- Like SET TRANSFER DISPLAY, but applies only to FTP
connections, and does not affect Kermit- or other protocol file transfers.
- SET QUIET { ON, OFF }
- This command applies to Kermit in general, not just FTP. OFF by default;
when ON, it surpresses most messages from most commands as well as the
file-transfer display.
- SET FTP PROGRESS-MESSAGES
{ ON, OFF }
- Tells whether Kermit should print locally-generated feedback messages for
each non-file-transfer command. ON by default.
- SET FTP VERBOSE-MODE { ON, OFF }
- Tells whether to display all responses from the FTP server. OFF by
default. This shows all responses to all commands, except when the
file-transfer display is active, and unless you have SET QUIET ON. When OFF,
responses are shown only for commands such as FTP PWD whose purpose is to
display a response.
- SET FTP DEBUG { ON, OFF }
- Tells whether local client debugging information should be displayed.
OFF by default. When ON, the commands that are sent to the server are
shown, as well as its responses (even if VERBOSE-MODE is OFF), plus
additional informational messages are printed regarding the progress of
secure operations. Also, the temporary file created by the
MGET command is not deleted so you can see what's in it.
Set all of these to OFF when silent running is desired.
3.3.2. Operational Preferences
- FTP DISABLE
new-protocol-feature-name
- FTP ENABLE
new-protocol-feature-name
- Explained in Section 3.11.
- SET FTP AUTOLOGIN { ON, OFF }
- If you give this command prior to opening an FTP connection, it controls
whether Kermit tries to log you in automatically as part
of the connection process. Normally ON, which means the username and
password are sent automatically (and prompted for if
they are not yet known). When OFF, FTP OPEN connects to the server without
logging in. OFF is equivalent to the -n
command-line option when using Kermit's FTP command-line personality.
See Section 3.1.4 for usage.
- SET FTP PASSIVE-MODE { ON, OFF }
- ON by default, to avoid random TCP port assignment for data connections,
which can prevent FTP protocol from working through firewalls and network
address translators (for more on these topics, see the Kermit security reference. Set to OFF in case the
FTP server does not support passive mode, or in case the client has problems
with it (it has been observed, for example, that when using passive mode, the
SCO XENIX 2.3.4 TCP/IP stack hangs in the connect() call forever).
Synonyms: PASSIVE [ ON ], PASSIVE OFF,
PASV [ ON ], PASV OFF.
- SET FTP SEND-PORT-COMMANDS
{ ON, OFF }
- This command determines whether the FTP client sends a new PORT command
to the server when accepting incoming data connections (as when not using
passive mode.) When PASSIVE-MODE is OFF and SET SEND-PORT is OFF, the port
that was originally specified is reused. This is the default behavior for
normal FTP clients but it is not compatible with many firewalls.
- SET FTP CHARACTER-SET-TRANSLATION
{ ON, OFF }
- Whether to translate character sets when transferring files with FTP
(explained in Section 3.7). OFF by default.
- SET FTP SERVER-CHARACTER-SET name
- Tells Kermit the character set used by the FTP server, UTF-8 by default
(Section 3.7).
- SET FTP SERVER-TIME-OFFSET
delta-time
- Tells Kermit to apply the given delta
time to file timestamps provided by the server for its files; for
use when (for example) the server does not have its timezone set
correctly.
- SET FTP ERROR-ACTION
{ PROCEED, QUIT }
- When transferring a group of files with FTP, and an error occurs with one
of the files, Kermit normally goes on the next file. Use SET FTP
ERROR-ACTION to QUIT to make Kermit stop the transfer immediately and
fail if an error occurs with any single file in the group. Example:
you have given Kermit a list of files to send, and one of the files can
not be found, or read permission is denied. Note that cancelling a
file by typing 'X' during transfer is not considered an error (if you want
to cancel the entire transfer, type 'Z' or Ctrl-C).
- SET FTP PERMISSIONS
{ AUTO, ON, OFF }
- When uploading files with PUT or MPUT, this tells whether Kermit should
send each file's permissions. The default is OFF, which means not to send
permissions, in which case the uploaded file's permissions are set by the
FTP server according to its own criteria. ON means to send them, AUTO
means to send them only if the client (Kermit) and server are on like
platforms (e.g. both UNIX). This command has no effect when downloading,
since the FTP protocol does not include a way for the server to inform the
client of a file's permissions. Also see
FTP PUT /PERMISSIONS.
Note that setting permissions after uploading is likely to work (correctly or
at all) only when the client and server platforms are alike (e.g. both of them
are some form of UNIX). Also note that Windows files don't have permissions.
Also see FTP CHMOD.
- SET FTP DATES
{ ON, OFF }
- When downloading files with GET or MGET, this tells whether Kermit should
try to set the received file's date from the server's date. FTP DATES is
ON by default. Note, however, that FTP protocol does
not allow date preservation when uploading. So at best, SET FTP DATES ON can
work only when downloading, and then only when the server agrees to furnish
file dates.
- SET FTP FILENAMES
{ AUTO, CONVERTED, LITERAL }
- When uploading (sending) files, this tells whether to convert outbound
filenames to "common form". This means allowing only one period in a name,
uppercasing any lowercase letters, replacing spaces by underscores, etc.
AUTOMATIC is the default, meaning LITERAL when client and server are the
same type of system (e.g. UNIX) and CONVERTED otherwise. Special case: if
the setting is AUTOMATIC and the client is not UNIX and the server
identifies itself as UNIX, Kermit uses a less-strict form of conversion, in
which lowercase letters are not uppercased and the filename can contain any
number of periods, but spaces are still converted to underscore. When
receiving, conversion generally means to change all-uppercase names to
lowercase and spaces to underscore.
- SET FTP UNIQUE-SERVER-NAMES
{ ON, OFF }
- Applies only to uploads. Tells the server to create new, unique names for
incoming files that have the same names as existing files. OFF by default,
in which case the server overwrites existing files with new files of the
same name. When ON, the server uses its own built-in method for creating
new names for incoming files; for example, appending a period (.)
and a number to the name. CAUTION: Use this option only if you do not need
to refer to the file after it is uploaded, since FTP protocol provides no
mechanism for the client to find out what name was assigned by the server.
- SET FTP COLLISION { ... }
- When downloading, what to do if an incoming file has the same name as an
existing file. Options are the same as for SET FILE COLLISION. If this
command is not given, Kermit's regular FILE COLLISION setting is used. If
this command is given, it overrides the FILE COLLISION setting for FTP
transfers only. See Section 3.6.2 for details.
- SET FTP TYPE
{ TEXT, BINARY, TENEX }
- Changes the default transfer mode. When sending (uploading) files,
this command has no effect unless you disable automatic text/binary mode
switching (Section 4) with SET FILE SCAN OFF or SET TRANSFER
MODE MANUAL. When receiving (downloading) files, this command establishes the
transfer mode to be used when a filename does not match any of Kermit's text
or binary filename patterns, unless you use SET FTP GET-FILETYPE-SWITCHING or
SET TRANSFER MODE MANUAL to disable automatic switching, in which case, this
command establishes the transfer mode for all downloaded files. In all cases,
however, the FTP TYPE can be overridden in any GET or PUT command by including
a /TEXT (/ASCII), /BINARY, or /TENEX switch. The FTP TYPE is independent of
the Kermit FILE TYPE setting. TENEX is used for sending 8-bit binary files to
36-bit platforms such as TOPS-10, TOPS-20, and TENEX, and getting them back
again. Synonym: ASCII = TEXT. Note: there is
also an FTP TYPE command, which does what SET FTP TYPE does but also sends a
TYPE command to the server immediately if the given type is different from the
current one.
If you want want specific FTP preference settings to be in effect for all
your Kermit FTP sessions, put the desired SET FTP commands in your Kermit
customization file (~/.mykermrc in UNIX, K95CUSTOM.INI in
Windows).
[ Top ]
[ FTP Top ]
[ C-Kermit Home ]
[ Kermit Home ]
In Kermit, commands for directory and file management can refer to:
- The local computer
- A remote computer when you have a connection to a Kermit server or IKSD.
- A remote computer when you have a connection to an FTP server.
(There can also be an HTTP connection, but the commands in this section don't
apply to HTTP connections.)
Thus in general, each such command comes in three forms:
- With no prefix in C-Kermit 8.0.200, it refers to the local computer
(CD, DIR, etc). In C-Kermit 8.0.201 and later, however, the "locus" switches
to automatically to the remote FTP server when you make an FTP connection (see
the SET LOCUS description Section 7); thus C-Kermit 8.0.201
acts almost exactly like a regular FTP client when it has an FTP connection,
yet still acts like itself on other kinds of connections.
- With the REMOTE prefix, it is for a Kermit server (REMOTE CD,
REMOTE DIR).
- With the FTP prefix, it's for an FTP server (FTP CD, FTP DIR).
- Also see Section 3.8, which explains "R-commands" and
"L-commands".
Kermit's FTP file and directory management commands are as follows. When an
R-command is included in the Synonyms list, be sure to read Section 3.8 about rules for use of R-commands.
- FTP CD [ directory ]
- Tells the FTP server to change its default (working) directory to the
one given, which usually must be expressed in the syntax of the server
platform (UNIX, VMS, etc). If the directory is not specified, the result
depends on the FTP server -- it might complain that the command is
illegal, or it might change to your original login directory.
Synonyms: FTP
CWD (Change Wording Directory); RCD.
- FTP CDUP
- Tells the FTP server to change its default (working) directory to the
parent directory of its current one (equivalent to
"cd .."
in UNIX, or "cd [-]" in VMS).
Synonyms: RCDUP, FTP UP.
- FTP PWD
- Asks the FTP server to report ("print") its current working directory.
Synonym: RPWD.
- FTP MKDIR directory
- Asks the FTP server to create the directory whose name is given. In
general, the name must be in the syntax of the server's file system, and
it must be either absolute (a full pathname) or relative to the server's
current (working) directory. This command fails if the directory can't
be created for any reason, including that it exists already.
Synonym: RMKDIR.
- FTP RMDIR directory
- Asks the FTP server to remove the directory whose name is given. The rules
are the same as for MKDIR, plus in most cases, the server will not remove
any directory unless it is empty.
Synonym: RRMDIR.
- FTP DIRECTORY [ filespec ] [ redirectors ]
- Tells the FTP server to send a directory listing of the specified files.
If no filespec is given, the server lists all files in its current working
directory. The results are in whatever format the server chooses to send
them. You can use UNIX-like redirectors to send the listi