OpenSSH versus SSH
utcc.utoronto.ca
utcc.utoronto.ca
If the goal of a committee member is merely to be included in the committee. Otherwise, if the committee is merely operating as a rubber stamp for every one of it's members proposals, then there may not be much productive value in remaining there. Apparently that feeling was mutual.
- lots of protocols like HTTP and SMTP that use ABNF and text,
- protocols like DNS, SSHv2, and TLS that use ad-hoc syntax and encoding,
- NFSv4 (which uses ONC RPC),
- protocols like XMPP that use XML
and many others.The IETF doesn't care very much about those details because by the time a protocol has been brought to them for standardization it's already too late to insist on radical changes unless those radical changes are necessary to make the protocol secure or otherwise viable on the Internet.
Hatred of ASN.1 is misplaced and has been extremely counter-productive. Hatred of BER/DER/CER and all TLV encoding schemes ever is fair (so let's adopt OER!). Hatred of ASN.1 has led to things like Protocol Buffers, which... uses a TLV encoding because... probably the designers didn't really take the time to understand what came before.
But I suspect -and keep in mind that I wasn't there- that for DNSSEC hatred of ASN.1 was only part of it, with the other part being a desire for proper name constraints[0] and trust hierarchy[1].
It does make sense that if the names we wish to authenticate are hierarchical in nature[2] then the PKI for it should use the same hierarchy. The only reason that the WebPKI isn't structured the same as DNSSEC is that historically the support for x.509 naming constraints wasn't there, then the business model of the WebPKI made all those on the inside not want to fix that. Now that we have Let's Encrypt the latter problem is going away, but the underlying issues remain.
This is where you and I part and disagree. You greatly dislike DNSSEC, while I greatly like it. You especially dislike DANE, and I especially want DANE. But it's nice to know that we at least agree on ASN.1 and x.509.
[0] x.509 has this, but it's ill-supported in WebPKI land.
[1] x.509 also has, kind of[3] but which, again, WebPKI does not.
[2] DNS naming is strictly hierarchical, though one can be forgiven for thinking that the com. zone is just one big flat swamp as it really is, but it's not the whole of the DNS.
[3] Well, in x.509 the hierarchy of CAs is based on x.500 naming, which is just not appropriate for a web where URI authority names are DNS names (to say nothing of what a disaster x.500 naming is). There's alternative issuer names, which includes dNSName, but once more, the issue is how widespread the support for those is.
Forking implies a problem in one or more areas:
- governance
- usability (documentation and examples)
- potentially NIH-syndrome
protobufs, capnproto, flatbuffers, thrift, msgpack, erlang terms, BSON, java class files, and more exist to scratch itches that are not universally scratchable. You can't argue with the readability, portability, simplicity, or usability of JSON.. although you can argue with it's low density and parsing cost.
What's missing generally in computer science, software engineering, and systems engineering is standardization down to a minimal, feature-complete subset of interchange formats, protocols, and APIs in the spirit of professionalizing and standardizing the industry with trusted conventions. The issue has been raised many times over the past 60 years, but at some point, there needs to be more than the rare bird of "professional engineering" licensure and too common and useless A+ certifications.
I like DNSSEC and DANE because the combination adds another security layer to corroborate what PKI says. If browsers adopted it, it would be widely deployed to web-facing services. Like GPG, it has a UX problem and is a PITA to setup. (Sadly, a major DNSSEC multi browser extension effort shutdown.) I thought we were pro defense-in-depth rather than less security, so I don't understand the hate DNSSEC receives because it's not an alternative so much as a secondary trust-supporting mechanism.
Disclaimer: I run PKI at home where every machine has 802.11x certs, every "intranet" has a cert from an intermediate cert, and every service like vSphere has its own subordinate signing cert. I keep meaning to migrate over to FreeIPA with Dogtag.
Nothing about DNSSEC precludes the addition of CT, and it will eventually happen.
DNSSEC w/ query name minimization means that any zone that wishes to MITM you has to potentially make the decision without first knowing what your target domain is, or even who you are (obviously this last depends on context), and the more indiscriminate they are in their MITM activities the more likely that they'll be caught. That's a big deal, and something WebPKI can't offer -- WebPKI only has CT to offer for mitigating the MITM power of CAs, and CT depends on people auditing the logs.
Hah, the joke's on you: ASN.1 has JER, which is the ASN.1 JSON Encoding Rules :)
So you can specify JSON schemas in ASN.1 syntax, which means that you could transcode from any of the other ASN.1 encoding rules, which include:
- BER/DER/CER (TLV encodings)
- OER/PER (like XDR, but with one octet alignment)
- XER (yes, the X is for XML -- XML Encoding Rules)
- GSER (a pre-JSON JSON-like encoding rules for
ASN.1 invented at IETF)
- and other ERs that are proprietary
- and any ER you care to create, which could just
be bindings of other encoding schemes like
Flat Buffers or anything else you like.
I've been wanting an XDR-based encoding rules...
Which goes to show that a lot of the encoding schemes you listed could just have been ASN.1 ERs from the get-go and: - benefited from existing ASN.1 modules
- benefited from transcoding
- benefited from existing ASN.1 compiler codebases
But no, people had to reinvent the wheel all the way to the syntax and semantics without adding much of anything truly new.> I like DNSSEC and DANE because the combination adds another security layer to corroborate what PKI says. If browsers adopted it, it would be widely deployed to web-facing services. Like GPG, it has a UX problem and is a PITA to setup. (Sadly, a major DNSSEC multi browser extension effort shutdown.) I thought we were pro defense-in-depth rather than less security, so I don't understand the hate DNSSEC receives because it's not an alternative so much as a secondary trust-supporting mechanism.
I agree with this, though I'm not sure what is the antecedent of "it" in "[l]ike GPG, it has a UX problem..." -- could be DNSSEC, but it could also be PKI! :)
Also consider TdR of OpenBSD and OpenSSH has been polarizing but impactful.
How someone reacts to him can reveal whether that person is someone who thinks they are smarter than they really are, a personality type that is common amongst software developers. These are the type of people who cannot admit when they are wrong, and will never admit that they are incompetent. Arguably, it is because of such people that we are drowning in crappy software, and even worse, that crappy software is popular.
IMHO, djb is on the side of the user, whether intentionally or not. djbdns allowed me, a user, to take control of DNS on the networks and computers I own. The philosophy of BIND at the time felt like "DNS is for DNS experts. We're experts. Do as we tell you."^1 I also learned nsd so I do use BIND zone file format. But I never became a BIND user.
1. I see a parallel in the context of "certificate authorities". Nothing wrong with "CAs" in theory but in practice, i.e., commercialisation of certificates and browser-centricity, the system reeks. Pay to play, or at least mandatory third party intermediaries, and generally user hostile.
(They're practically obsolete now, so there isn't much uncertainty about who had the better side of this argument.)
https://www.internic.net/domain/root.zone
I agree that they are optional, but I wouldn't go so far to say they're obsolete.
AXFR has been valuable for interop, though, and allows you to have diverse implementations of authoritative servers.
Please do not do this :)
One comment I agree with from a linked article:
https://mjg59.dreamwidth.org/65874.html
>It takes all the problems associated with HTTPS and makes it SSH's problem also. This relates also to the reasons why OpenSSH refuses to accept patches that implement SSL/TLS pki and instead implemented their own CA model.
Under this scenario, if the site rotates their key, will I need to decide on my system to trust it or not ? Maybe change something on my system ?
Or does the remote site use my ssh public key transparently to know it is me, and allow me in ? So I do nothing at my end ? I guess that would be OK by me. But as I noted above, I am guessing.
You can also sign host keys and then trust the CA instead of the host key with TOFU, but as mentioned in the article, there's no way to do this without having the user fiddle with their SSH config and I'm unsure how good the tooling for distributing revocations is.
Vault has a setup guide, along with the little dance a user would have to do: https://developer.hashicorp.com/vault/docs/secrets/ssh/signe...
Considering that SSH is generally used by a small number of people per server vs. a general access mechanism (for the general internet), the need for PKI hasn't seemed as pressing. But why it isn't more prominent, I don't know.
Right now, a server has a single host key. This is generated once and will remain static for the server's entire lifetime. The client has the public part of that in their authorized_keys. When a session is created, the server uses the private part to sign some stuff, and the client validates it using the already-known public key. In other words, we have the host key K, client stores K_public in known_hosts. On session creation, server does `session_signature = K_private.sign(data)` and sends (data, session_signature) to client. Client does `K_public.validate(session_signature, data)` and continues if it all matches.
This usually works just fine, but you can only have a single key for a server - which is a bit of an issue if that "server" is actually an entire cluster consisting of thousands of machines. Every singly machine needs to have a copy of the single private key. as delegating this to a secure enclave is unfeasible if you get hundreds of thousands of connections per second. Not to mention that key rotation is a bit of a nightmare.
With this proposal, we add a parent key, let's call it L. L_private is stored in some kind of very secure hardware enclave. Every hour/day/whatever, the server generates a new host key K, and asks the enclave to sign the new public key. The server now has K_private, and `host_signature = L_private.sign(K_public)` as generated by the enclave. The client stores L_public in their known_hosts. On session creation, server does `session_signature = K_private.sign(data)` and sends (data, session_signature, K_public, host_signature) to the client. The client finally does `L_public.validate(host_signature, K_public) && K_public.validate(session_signature, data)`.
All of this happens on the server side, and the only thing needed is a relatively minor protocol upgrade. The interesting part is that a very similar mechanism already exists for the client's key, making it way easier to manage hundreds of keys across thousands of servers without going crazy by having to update authorized_keys among the entire server fleet multiple times per week.
If the host presents a new key, plus a signature from the old key which you already trusted, then your system switches to trusting the new key?
I can see that there are problems in that if you don't attempt to log in between when the new key is issued and the old key expires, then you won't be able to trust the switch and will have to re-authenticate via external means. That might be a problem, but it might be easier for some groups of people to manage than figuring out a whole new CA model?
If a valid emergency private key lives in the safe, realistic bad guys (who don't do black bag jobs, they just read bug lists and act quickly) can't have that key until you put it into use.
So you could have a situation where say, you schedule key replacement every 12 months, you always immediately generate and announce the next key, but it lives in the safe until the rotation happens or something goes wrong and you use it immediately.
SSH already does an automatic key exchange when you start a session (and has for decades); the private/public keys used for authentication aren't the same keys as used for encryption of an established session.
There's an obvious infosec observation here. Different stacks, different hacks. Maybe individual infosec people should adopt a randomly chosen stack from among the less popular. Then the dreaded zero-day that hits the most popular stack won't cut off their access entirely.
The article also says:
"I don't think anyone else is working on new protocol features; instead, OpenSSH comes up with them and then people with other SSH implementations either follow along or not."
One obvious exception is curve25519-sha256@libssh.org which is the preferred kex.
Safety in numbers is probably a better option than security through obscurity in this case.
Those rash of OpenSSH and OpenSSL vulnerabilities back in the late 90s seemed like it was targeted at Theo just because he acted like a jerk and he knew it. The never compromised tagline of OpenBSD was flushed down the toilet and at the time it really seemed like it was a deliberate attack
LibreSSL is.
https://en.wikipedia.org/wiki/Secure_Shell https://en.wikipedia.org/wiki/F-Secure
> Later licenses restricted the use of ssh in a commercial environment, instead requiring companies to buy an expensive version from a company called Datafellows.
The "securing" part aside, ssh still gives you a whole terminal experience very similar to the telnet one & the ability to draw into it (like if you were using Emacs on the shell host).
You can set something like that up by forcing a command on ssh instead of a shell (like what github does for git).
Then again many programs aren’t secure against untrusted input either.
If you're actually willing to write the app.
Go to http-something in your web browser which is a Guacamole install and log in to Guacamole as "guest" / "guest" then in guac the only connection option is some SSH login that'll appear in your web browser
As a warning people have tried to supply "nethack as-a-service" or whatever and people are really creative about gaining shell access somehow anyway, via buffer overflows or who knows what. You can do it, just be careful.
https://github.com/shazow/ssh-chat
https://github.com/zachlatta/sshtron
https://github.com/quackduck/devzat
https://github.com/donuts-are-good/shhhbb/
There's also a assembly library:
And for rust there's trush, and for python paramiko as mentioned.
> expose a TUI/cli-app over ssh without actually caring about securing OpenSSH
If you already have an app, see maybe:
https://drewdevault.com/2019/09/02/Interactive-SSH-programs....
Do you mean thrussh?
It looks like that hasn't been updated in 2 years. But there is an active fork of it called russh.
So now you have layers of:
- SSH RFC
- OpenSSH extensions to SSH
- Google extensions to OpenSSH
There's already mature CA support in OpenSSH
https://dev.to/gvelrajan/how-to-configure-and-setup-ssh-cert...
And even OpenSSH 8.2+ supports FIDO2 built-in.
Can add TOTP, FIDO2/u2f, ldap, or kerb with pam also.
Edit: or is there some ability for clients to leverage the CA to establish trusts without authorized_keys?
> In one recently relevant example, one reason Github didn't take advantage of OpenSSH's protocol extension for offering multiple host keys (to enable upgrades or transitions) is that they don't use OpenSSH but instead a different implementation.
? I thought GitHub didn't use the host-key-migration capability because the host key change was implemented on a semi-emergency basis. I mean, in this case I don't think you'd want to start a host-key migration without announcing it, and GitHub wanted off of the exposed RSA host key very quickly.