Skip to content

KiTTY 0.84.1.74-beta

Pre-release
Pre-release

Choose a tag to compare

@hknet hknet released this 13 Aug 01:05

KiTTY 0.84.1.74-beta

The agent checks that a remembered key is still your key - and your session logs work again.

Security first, because this one changes what kageant does with keys you asked it to remember:

  • kageant now verifies a remembered key before it offers it. When it loads a key automatically - at startup, when the drive holding it turns up, or when a key it unloaded because you pulled that drive comes back - it compares the key against the fingerprint it recorded for that path, and it makes that comparison on the key it actually ended up holding rather than on a separate look at the file. If they differ, the key is taken back out of the agent instead of being offered to servers. This is aimed at the case the feature exists for: a key file on a stick or a share, where what is at that path is not always what you put there.

  • It does not ask you anything at a bad moment. No dialog while you log in, none when you plug something in. A key being held back shows up in three places instead: the key list shows it as a mismatch, the tray tooltip says how many keys are being held back, and if a program asks the agent for its keys while one is, a notice says so and names the program - which is usually the moment you notice a login failing.

  • Accepting a changed key is deliberate, and happens in one place. If you replaced the key yourself, open it in the key list (double-click the row) and press Accept this key: it shows the fingerprint recorded next to the one the file holds now, asks once, and only then remembers the new key. Nothing else in KiTTY adopts a fingerprint.

  • Keys remembered by an earlier version have nothing to check against. Those load once as before, their fingerprint is recorded then, and they are checked from that point on - so upgrading does not lock you out of anything.

  • Confirmation before key use now covers every route to a key. Keys added through the agent's add-key extension, and SSH-1 challenge signatures, skipped the per-key "ask before use" flag, so a key that should have prompted could be used without one. A malformed agent message with an empty body could also read past its buffer and stop the agent. Both fixed.

  • "Ask confirmation before key use" remembers Never. The three-state setting was stored as an on/off, so Never came back as by key comment at the next start - quietly restoring prompts you had switched off.

  • A key that will not load can no longer silence the agent. kageant used to report that with a message box while it was loading your remembered keys, and a modal stops its message loop: until someone clicked OK the agent answered nothing, so every ssh, git or scp call that wanted a key just hung. It is a tray notice now, and the key stays in the key list where Remove drops it for good.

Logging, from two issues you reported:

  • Session logs carry timestamps again (#30). Session > Logging > Timestamp (strftime format) has been in the dialog all along and was saved with the session, but nothing ever wrote it to the log. Set a pattern and every logged line is stamped; %f gives milliseconds. A button beside the field fills in a working pattern or clears it, so you can try it without knowing strftime, and a pattern the system cannot parse is ignored with one line in the Event Log rather than mangling the log.

  • Log rotation works (same issue). Log rotation delay was dead in the same way. It now starts a new log file at the interval you set - and it declines, with a note in the Event Log, when the log file name has no time-varying &-code in it, because reopening the same name would overwrite your log every few seconds rather than rotate it. Put &T (or &Y&M&D) in the file name to use it.

  • Open this session's log file from the window menu (#31). Tools > Open log file hands the current log to whatever opens .log files on your machine - handy when the name contains a timestamp and "the current one" keeps changing. It flushes first, so the newest lines are there. Bind a key to it with openlogfile in [Shortcuts].

  • "Clear log file" does what it says. It went through the same path a session start uses, which re-asks the "what if the log file exists" question - so with append selected, an explicit clear did nothing at all. It now empties the file whatever that setting says, and renames itself to Start a new log file now when the name contains a time, because there a reopen writes a new file rather than clearing one.

Also in this release:

  • A kitty.ini now says which KiTTY wrote it, and the shipped kitty.ini.example says which release it came from - so a copy pasted into a support thread can be traced back to a version.

Upgrading: nothing to do. The first start after upgrading records fingerprints for keys kageant already remembers; from then on it checks them.

One limitation worth knowing, and it is in KNOWN-ISSUES as well: the fingerprint and path kageant compares against live in the registry (or in kitty.ini on a portable install) in plain text. Anything running under your account can rewrite them. The check answers "is this still the key that was on my stick?" - it is not a defence against malware already running as you.

Full changelog & known limitations: https://github.com/hknet/KiTTY/blob/kitty-0.84.1.74-beta/KNOWN-ISSUES.md