183 points · by ingve · 3y ago · 96 comments
(They're practically obsolete now, so there isn't much uncertainty about who had the better side of this argument.)
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.
Also consider TdR of OpenBSD and OpenSSH has been polarizing but impactful.
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.
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?
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...
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.
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.
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.
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.
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.
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.
If you're actually willing to write the app.
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.