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
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, normally 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
NetBSD Windows Internet 3717596 645274
NetBSD Ubuntu Internet 3569624 4040985
Ubuntu Ubuntu Self 62171563 70642159
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.

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:

https://askubuntu.com/questions/1440943/block-all-incoming-requests-but-local-network
https://help.ubuntu.com/community/IptablesHowTo
https://upcloud.com/resources/tutorials/configure-iptables-ubuntu
C-Kermit 10.0 / The Kermit Project / Page created: 18 November 2022