Kermit has these modes:

  • Command mode. This is a command-line interface and should be familiar to people that are used to the traditional FTP client, or to CLIs on things like routers and firewalls, or shells. You can use commands like cd and dir to view files on your local system, or remote cd (aka rcd), rdir, etc. to view files on the local system. Commands like get and send transfer files. This is similar to the mode you get when you press Ctrl-] in telnet. If you just invoke kermit with no parameters, you are in command mode.
  • Connect mode. In this mode, you are connected to the remote system. When you are in command mode and run ssh somehost, you will automatically be put into connect mode. This is very much like the mode you are in when you type ssh somehost at the shell.
  • Server mode. In this mode, kermit is waiting for Kermit protocol commands from the remote. These commands might include things like listing directories, transferring files, etc.
  • Transfer mode. This mode happens when a file is actively being transferred.

You can flip between modes:

  • When in command mode, if you have an active connection, just type c and hit return to go back to connect mode. Or, use a command like ssh, telnet, set host, etc. to establish a connection.
  • When in connect mode, press Ctrl-Backslash and then hit c to return to command mode. Ctrl-Backslash in kermit is very similar to the RET ~ in OpenSSH; you can press Ctrl-\ ? to see other connect-mode actions.
  • You can explicitly enter server mode by running kermit -x, typing the server command while in command mode.

Kermit also has a feature where it will automatically start server mode on the remote. Here’s an example:

jgoerzen@hephaestus:/tmp/t$ kermit
C-Kermit 10.0 Beta.08, 15 Dec 2022, for Linux+SSL (64-bit)
 Copyright (C) 1985, 2022,
  Trustees of Columbia University in the City of New York.
  Open Source 3-clause BSD license since 2011.
Type ? or HELP for help.
(/tmp/t/) C-Kermit>

OK, I’ve launched kermit. Here I am in command mode with my local user. Let’s ssh to the remote; that will put me into connect mode:

(/tmp/t/) C-Kermit>ssh auxuser@localhost
Connecting via command "ssh -e none auxuser@localhost"
 Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
auxuser@hephaestus:~$

OK, now I’m in connect mode. I can send a file:

auxuser@hephaestus:~$ kermit -Iis /bin/sh
Return to your local Kermit and give a RECEIVE command.

KERMIT READY TO SEND...
----------------------------------------------------
----------------------------------------------------
 SENT: [/usr/bin/dash] To: [/tmp/t/sh] (OK)

auxuser@hephaestus:~$

I didn’t actually have to give the receive command, because my local kermit saw the special sequence to initiate a transfer, and automatically jumped into transfer mode.

Now let’s go into command mode and do some stuff. I’ll hit Ctrl-\ and then press c.

(/tmp/t/) C-Kermit>rpwd
/home/auxuser

So we see the current working directory on the remote. But wait a minute, rpwd (aka remote pwd) uses the kermit protocol, but at the remote I was just at the shell. What happened?

Kermit was smart enough to know there wasn’t a kermit connection running, so it just sent kermit -x to the remote, placing it in server mode. Clever!

I can even do something like this:

(/tmp/t/) C-Kermit>get /usr/bin/bzip2

Since all these transfers are on my local machine, they’re so fast I don’t even see the transfer-in-progress status screen. Rest assured it does exist and you’ll see it on slower connections.

Now, I could type connect (or just c) to return to the remote. But the remote is in server mode, so I’d be greeted by silence if I did that. I have two ways to get the remote out of server mode:

  1. I could just connect and send a few Ctrl-Cs
  2. I can send the finish (or just f) comand before returning.

Let’s do the second:

(/tmp/t/) C-Kermit>finish
(/tmp/t/) C-Kermit>c
Connecting via command "ssh -e none auxuser@localhost"
 Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------

C-Kermit server done

auxuser@hephaestus:~$ history | tail -n 3
  799  kermit -Iis /bin/sh
  800  kermit -x
  801  history | tail -n 3

Look at that - it’s the kermit -x invocation right there in history even.


Kermit (and its main implementation in ckermit) is: