Icon The Kermit Project   |   Now hosted by Panix.com
New York City USA   •   kermit@kermitproject.org
since 1981

C-Kermit 10.0 client/server configuration on Unix and Windows

Frank da Cruz
18 November 2022
Most recent update: Wed Dec 21 16:10:37 2022
A handy feature of C-Kermit is its ability to operate in a client/server arrangement, described here, where you only have to interact with the Kermit program you are using directly, and it controls the Kermit program on the other end of the connection. A little-known wrinkle on this arrangement is that the Kermit server can also be set up to await an incoming network connection from another computer. For example, you can tell C-Kermit on (say) testing.xyz.org to go into server mode and await a connection as follows:
set host /server * 3000
and then on (say) your desktop computer you can tell its copy of C-Kermit to:
set host testing.xyz.com 3000
The '*' is a Kermit-specific notation meaning "wait for an incoming connection" and "3000" is the TCP port number — just pick any number that is not normally in use, usually anything above 2000 will do. Now you have a connection on which you can send files from your desktop to the server on testing.xyz.com, and also fetch files from the server. The connection is secured by SSL if both Kermit partners were built with SSL support, the appropriate certificates are installed, and the negotiations are successful; otherwise it is clear-text connection.

This arrangement is particularly handy when you have two or more computers on your desktop and you need to move files between them. As an example, suppose you have an old Linux computer and you just bought a new one to replace it. How would move all your years of of work from the old computer to the new one? Especially if the new computer doesn't have any form of removeable media. Set up the connection as just described, start the server on the new computer and the client on the old one. Then at the client:

cd ~userid                              # CD to your home directory on the old computer
remote cd ~userid                       # Also on the new computer
send /recursive /dotfiles /nobackup *   # Send your entire directory tree
Then just sit back and watch. "remote" means to send the command to the server; "/recursive" means to descend into all the subdirectories and recreate the same directory tree on the new computer. "/dotfiles" means to include files whose names begin with with a period, such as .bashrc, that are normally "invisible". "/nobackup" means to skip Emacs backup files such as index.html.~243~. And the '*' at the end of the "send" command is a filename-matching wildcard notation that means "all files".

What if your old computer is Windows and your new computer is Linux? Exactly the same procedure except your Windows computer probably doesn't have dotfiles or backup files (but you can still include those switches just in case). But — you might ask — won't the text files that arrive on my new Linux computer be in Windows format? Nope. Kermit knows all about that; it automatically detects whether each file is binary or text, and if text it converts its record format appropriately (CRLF line terminators to LF in this case).

Transferring a 50MB file with C-Kermit 10.0
Server Client Connection Download cps Upload cps
Ubuntu Windows Desktop 11863946 11524973
Windows Ubuntu Desktop 11863943 12674541
Windows* Windows Desktop 12364335 12908796
NetBSD Windows Internet 3717596 645274
NetBSD Ubuntu Internet 3569624 4040985
Ubuntu Ubuntu Self 62171563 70642159
* The Windows-Windows example is two separate Windows machines on the same desk. This prompted a Windows Defender warning on the server end (see screenshot); clicking "Allow access" sufficed to let the operation operation proceed.

As you can see the main benefit of this technique is for inter-desktop transfers. The Internet is much slower, and also your ISP prioritizes traffic coming in over traffic going out, so uploads from your desktop to the Internet are especially slow. On the other hand, in my case the inter-desktop transfer rate is about 12MB/sec in each direction so you could transfer a gigabyte in about 83 seconds and a terabyte in about a day without the need of secondary storage devices.

Special considerations for Windows 11

I got a new Windows 11 machine because my Windows 10 machine is on its last legs after about 10 years of constant use. I needed to move all my files from the old to the new machine, probably about 700GB. A 50GB test transfer using only the desktop network went smoothly at 9-10 MB/sec. So I started a much larger transfer and ran into an unexpected brick wall. Windows 11, unlike all of its predecessors, copies all of your files to its "cloud" for backup and "sync'ing" among all your devices (and who knows what else!). But my Intenet connection is only about 5 MB/sec, so that slowed the transfer way down because each file had to stored locally and uploaded to the Cloud. Anyway, after a while the transfer failed because my "OneDrive" was full and Microsoft wanted me to pay to increase it. What's more, many of files I had transferred succesfully suddenly showed up with red X's and missing thumbnails. Properies said "Error" (not bothering to say what the error was). Long story short, in consultation with the vendor, OneDrive was de-installed. Now everything works normally.

Fine points

Most modern desktop computers don't allow incoming connections in their standard configuration. Ubuntu, for example; the one on my desk will accept an incoming connection from itself but not from the Windows computer right next to it, and certainly not from any computer outside the local net. You have to go out of your way to set up this kind of access. Here are some resources about this:

C-Kermit 10.0 / The Kermit Project / Page created: 18 November 2022