That most do TOFU wrong¹ does not make TOFU itself insecure.
Most do do TOFU wrong though. In DayJob I run an SFTP-to-Azure-storage relay⁴ for clients to send automated feeds from third-party systems via that method⁵, and it wasn't until one client reported getting the wrong fingerprint that we noticed we were outputting the UAT and Live system values back-to-front in the on-boarding details, and had been doing for some time so at least a few other clients⁶ had just blindly accepted a different fingerprint to the documented one…
--
[1] Anyone else remember way way way back² when browsers stopped trusting self-signed certificates, or at least started shouting loudly about them? There was many a heated discussion with some who kept repeating “well TOFU is good enough for SSH” and wouldn't accept that 1. TOFU isn't as secure as they think it is the way they are using it and 2. They were accepting the risk for only themselves³ with SSH & TOFU-done-a-bit-wrong, which might be OK to them, but with HTTPS+TOFU on public sites they were essentially making that risk choice for everyone, which is not OK.
[2] somewhere in the very early 2000s?
[3] and their users
[4] Until recently there was no built-in support for this in Azure, and the recently-left-preview implementation is ~£186 per month per storage account which works out very expensive for our current storage-account-per-client layout (so without a refactor that might breach our client data separation policies running a small VM⁷ with my BIY service built around Blob-FUSE works out far cheaper)
[5] We offer “more modern” APIs for such things too, but SFTP is still the most widely supported method (often the only supported method) by the other software/infrastructure used by our clients
[6] and these are investment banks, who you'd like to think were properly paranoid about a transport mechanism they'll be sending business information and customer PII through…
[7] actually, a couple of small VMs and a little infrastructure for HA
In other words it's secure if you don't do TOFU and do out-of-band verification instead.
If verifying the fingerprint is such a key aspect of TOFU, then the dialog should be an input instead of an output. "Input here the expected fingerprint" in order to allow connecting. You'd have received it by some other means, and would type or copy-paste it into the terminal to finish the verification process. Et voila, safe TOFU completed!
Verifying the fingerprint out-of-band is the opposite of TOFU. TOFU is generally understood to mean not verifying it, but flagging if it changes later.
>If no identifier exists yet for the endpoint, the client software will either prompt the user to confirm they have verified the purported identifier is authentic, or if manual verification is not assumed to be possible in the protocol, the client will simply trust the identifier which was given and record the trust relationship into its trust database.