The Kermit Project
|
Now hosted by
Panix.com
New York City USA
•
kermit@kermitproject.org
…since
1981
|
Frank da Cruz(work on this page is in progress...)
fdc@kermitproject.org
ckw@kermitproject.org ← questions, problems, reports
Created: 16 July 2022
Last update: Sun Jul 9 07:35:58 2023 New York time
Ini files SSH setup New mouse features [Back to CKW Beta test]
File | Filename | Directory | Kermit variable |
---|---|---|---|
Root startup file | k95.ini | C:\ProgramData\Kermit 95\
| \v(inidir)
|
Sitewide initialization file | k95site.ini | C:\ProgramData\Kermit 95\
| \v(inidir)
|
Customization file | k95custom.ini | C:\Users\username\AppData\Roaming\Kermit 95\
| \v(appdata)
|
k95custom.ini
, is your personal customization file. Every
time you start CKW, it reads this file and executes the commands in it.
Among the many things you can do in your customization file is define
macros, which are multiple commands grouped into a single command.
So, for example, here's a macro to make an ssh connection to foo.bar.com,
where your user ID is "helga":
define somehost { # (put the actual host name here) set terminal font courier_new 10 # Font and size for CKW screens set terminal type vt220 # DEC VT220 terminal emulation set terminal character-set utf8 # Character encoding to use set terminal width 80 # CKW window width (characters) set terminal height 48 # CKW window height (lines) set terminal color lightgrey blue # Colors for the terminal screen set terminal scrollback 3000 # Keep a 3000-line scrollback buffer set gui window-position 1120 50 # Where to put CKW on computer screen set ssh heartbeat 60 # Keep SSH session alive during idle time ssh foo.bar.com /user:helga # Make SSH connection }Note: the
/user:
clause is unnecessary if you have set up
passwordless SSH key exchange.
"somehost" is now a command you can type at the Kermit prompt, which connects
and logs you in to foo.bar.com, at which point CKW switches automatically to
its terminal screen, which is sized, colored, and positioned as you
specified in the somehost macro. The parts that start with "
The same script should work no matter whether you have set up SSH key
exchange or not. The only difference is, if you haven't, you'll have to
enter a password. On the other hand, if you do have key exchange working,
you don't have to include the "/user:helga
" because the keys
know who you are (but it does no harm to leave it in).
For information about the commands themselves, type "help set terminal", "help set gui", "help set ssh", "help ssh" at the CKW command-window prompt, and for much greater detail see the terminal emulation section of the Kermit 95 manual.
The built-in handmade SSH support code from K95 2.1.3 was retired because (among other reasons) it didn't work any more due to changes in the ciphers used by modern SSH servers. As of the second CKW beta, SSH connections are accomplished through the Windows DLL (Dynamic Link Library) supplied with LibSSH, which supports only SSH V2.
K95's SSH client from 2003 is thoroughly documented HERE but it remains to be seen to what extent that document applies to CKW's new SSH client. About the latest version, see the file ssh-readme.txt in the CKB Beta.02 Zip archive for notes on the new implementation, which is also available online HERE.
Anyway, if you don't mind typing your host password every time you make an SSH connection, you can use CKW as-is "out of the box", no configuration required. Don't worry about security, your password is encrypted in transit. However, if you'd like the convenience of not having to type your password you'll need to take the steps that are described just below (if you haven't taken them already for some other Windows SSH client such as PuTTY).
Passwordless connections work by key exchange; the client sends its public key to the server and the server sends its own public key to the client. These are paired at each end with a secure, secret private key. Here's how to set up SSH key-exchange for login from CKW to most(?) Linux hosts. This procedure works in Windows 10; the procedures for previous Windows versions, other Unix-family host operating systems (e.g. BSD, AIX, macOS), or for completely different OS families like VMS will differ. You can skip part A if you have already set up your SSH keys on Windows for some other SSH client. For that matter, you can also skip Part B for hosts you've already installed your SSH public key on.
cd
C:\Users\
username".
dir .ssh
" to find out if SSH has
already been configured on your PC. If it hasn't you'll get a big error
message. If it has you'll see something like the following and you
(probably) won't have to do anything more on Windows end (proceed to
Part B):
Directory: C:\Users\username\.ssh Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 9/20/2022 7:58 AM 1369 id_dsa -a---- 9/20/2022 7:58 AM 600 id_dsa.pub -a---- 8/25/2022 7:18 PM 2590 id_rsa -a---- 8/25/2022 7:18 PM 564 id_rsa.pub -a---- 12/13/2022 6:37 AM 4288 known_hosts
.ssh
directory, give Powershell the command:
ssh-keygenssh-keygen asks you for a file name; just press Enter key to accept the default, which is
id_rsa
.
Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 8/25/2022 7:18 PM 2590 id_rsa -a---- 8/25/2022 7:18 PM 564 id_rsa.pub -a---- 8/26/2022 1:30 PM 697 known_hosts
id_rsa.pub
file is your public key that you upload
to every host you want to access without a password.
* | Strictly speaking, once for each key type you have to generate, in case all the hosts that you connect to don't accept the same key types, explained below. |
cd .ssh
" or if that
didn't work (because CKW was cd'd to some other directory):
"cd \v(home).ssh
". And if THAT didn't work,
cd to your home directory and then "mkdir .ssh".
ssh somehost.someuniversity.edu /user:usernameSince you don't have the keys set up at both ends yet, CKW prompts you for your host password. Enter the password, CKW makes the connection, and you'll find yourself in the terminal screen looking at a host shell session.
kermit -g
" (or "ckermit -g
" or "wermit
-g
") followed by the name of the public-key file;
example:
cd ~/.ssh kermit -g id_rsa.pub
ls -l
" command.
You should see something like this:
-rw------- 1 fdc kermit 563 Aug 25 19:31 authorized_keys -rw------- 1 fdc kermit 563 Aug 25 19:31 id_rsa.pub
authorized_keys
file DOESN'T EXIST,
rename id_rsa.pub
to authorized_keys
:
mv id_rsa.pub authorized_keys
authorized_keys
file ALREADY EXISTS,
you'll need to append id_rsa.pub
file to it:
catThen check theid_rsa.pub
>>authorized_keys
authorized_keys
file to make sure the new entry
is there:
tail authorized_keysand then you can remove the
id_rsa.pub
file (not strictly
necessary):
rm id_rsa.pub
.ssh
directory are protected from snoopers:
chmod 600 *
If a host you use doesn't have Kermit installed... You'll need to find another way to upload the file. You could download and build C-Kermit on the host yourself, or you can use any other file-transfer method you have at hand that also works on the host, or you could email your public key from Windows to your ID on the host as an attachment.
The procedure given above uses the oldest generation, RSA, because that's what the Windows version of ssh-keygen generates unless you tell it otherwise. To specify a particular keypair type, use:
id_ed25519
and id_ed25519.pub
. So creating keys
of different types doesn't destroy any keys you created with other types.
The reason you might need to keep different key types is that all hosts
do not necessarily support all key types.
If you followed the default procedure — which creates RSA keys — and they work satisfactorily, but now you want to switch to a "more secure" key format, go through the procedure again but substitute "ed25519" everywhere you see "rsa". See a discussion HERE or search Google for "rsa versus ed25519" (without the quotes).
Further reading:
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement
cd # cd to home directory cd .. # go one level up ls -l greta # check the permissions of your login directory chmod g-w,o-w greta # change to disallow write access to group and others ls -l greta # check the results cd # go back to home directory
By the same token your .ssh directory should be closed to the world:
cd chmod 700 .ssh
and the same for the files in it (your ssh keys and data):
cd .ssh chmod 600 *
Added mouse wheel support in Beta 3. By default it scrolls one line at a time or one screen at a time while holding Ctrl. You can remap it to whatever you like with the new "set mouse wheel" command which works much like the existing "set mouse button" command - can map wheel scroll events to any keyboard verb, etc.
Xterm-compatible mouse event reporting will be in the next Beta. There is one new command that controls it all: "set mouse reporting {disabled, enabled, override}".
Mouse reporting allows applications on the remote host to request mouse events using one of four protocols:
The default setting is Enabled which will only send mouse events to the remote host when requested if and only if that event is not mapped to some action within C-Kermit. So if you map right-click to paste with "set mouse button 2 none click \Kpaste" then right-clicks won't be sent to the remote application, they'll do \Kpaste as you told it to. If the application needed right-click for something you'd have to map right-click to \Kignore within C-Kermit in order for it to be passed through to the remote host.
The Override setting works slightly differently. As with the Enabled setting, when you're in a shell or another application that doesn't use the mouse all your mouse event mappings in CKW do whatever you've configured them to do. But when an application asks to receive mouse events, *all* mouse events are sent to the application and your mappings within CKW are ignored. So if you mapped right-lick to \Kpaste it would only do that outside of applications that use the mouse.
The New Open-Source Kermit Project hosted by Panix.com |