OpenSSH 8.4
marc.info
marc.info
The on disk key format that you see in your authorized_keys that begins with "ssh-rsa" is just the RSA key (it doesn't encode anything about the hashing algorithm). You will be able to continue to use that key with the "rsa-sha2-256" and "rsa-sha2-512" algorithms. The details of this are outlined in Section 3 of RFC8332[0].
I use this set, statically copied, in most of my various machines and logins. You can generate a `rsa-sha2-512` public key for your existing private key, but for most people the update is less confusing to generate a new key than to use a new private key. Only in scenarios where you have the same private key across several machines do you save any time, and I (and security professionals) have been advising against that for ages.
If you're using certificates then you may need to get those resigned. But most people aren't using certificates, just bare rsa keys.
And ssh-rsa client keys don't specify a hashing algo at all. Even if you specified `-t rsa-sha2-512` it would still output a ssh-rsa .pub.
> All aspects of the "ssh-rsa" format are kept, including the encoded string "ssh-rsa". This allows existing RSA keys to be used with the new public key algorithms, without requiring re-encoding or affecting already trusted key fingerprints.
How could one use agent forwarding with sftp? I guess for scp I can imagine a contrived example like `scp -AT server:'$(ssh server2 generate-paths)' .`, but for sftp? sftp doesn't seem to have a way to run an ssh client on the remote side, and it's not like agent-forwarding is needed for `-J`/`ProxyJump`.
A FIDO2 authenticator doesn't really "understand" most of what it signs, it's basically handed a blob by the big smart computer and signs that blob, which allows your web browser to add new features to WebAuthn without you having to buy a new Yubikey every week.
But the authenticator does also sign a small pile of bit flags with a meaning clearly defined for the authenticator's use, one of those flags (UP: User present) is defined to mean "I promise a human interacted with me somehow to signify presence" (e.g. "they pressed a button") and another (UV: User verified) means "I promise I verified the key's owner authorised this signature" (e.g. "I checked their PIN" or "The fingerprint matched")
So these bitflags are very trustworthy, the smarter and thus more vulnerable host application can't change them without consent by the authenticator. If my Yubico Security Key doesn't see my correct PIN, an adversary needs to subvert the actual Security Key if they want the UV bit set, just controlling my PC or phone doesn't help them do that.
Thus, this feature in OpenSSH will let justifiably paranoid administrators decide it's OK to use this FIDO2 key to log into this production server but only if the key promises that it checked its legitimate owner authorised this.
Almost all the corrections are around the '"ssh-rsa" public key signature algorithm' deprecation. The string "ssh-rsa" is used in many places, and has different meanings in different places. The notes should have been much more explicit about what is and what is not affected.
So you're only talking about volume of the same correction being repeated, not distinct corrections.
RSA keys themselves continue to be secure.
It might or not might make things more secure, but it will definitely cause a lot of pain.
I wish they would leave that choice to me.
It says "The RFC5656 ECDSA algorithms: ecdsa-sha2-nistp256/384/521." I think the last bit should be 512, not 521.
https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-186-draft.pdf
"The modulus for this curve is p = 2^521 – 1"."To be fair I should mention that there's one standard NIST curve using a nice prime, namely 2^521 – 1; but the sheer size of this prime makes it much slower than NIST P-256."
$ ssh-keygen -l -f MyKeyFile
2048 SHA256:39XX..XX x@y.com (RSA)
$ for f in ~/.ssh/*.pub; do ssh-keygen -l -f $f; done
All of my keys were using ED25519 or RSA-SHA256, so they will still be valid when RSA-SHA1 will be removed.Note that Debian Strech (oldstable, published in 2017) shipped openssh-client 7.4 which produced RSA SHA-256 keys by default.
The vast majority of client ssh-rsa keys are completely unaffected since they are bare rsa keys with no hashing done at all.
Remember that you can download the SSH public keys of any user on Github and run these statistics yourself.
https://github.com/linus.keys
Linus for example seems to have two keys, a 1024 bit RSA and a 2048 bit RSA.> The better alternatives include:
> The RFC8332 RSA SHA-2 signature algorithms rsa-sha2-256/512. These algorithms have the advantage of using the same key type as "ssh-rsa" but use the safe SHA-2 hash algorithms. These have been supported since OpenSSH 7.2 and are already used by default if the client and server support them.
Maybe only if you want to store the key on a separate physical device, and it only supports RSA?
Edit: Another reason one might still use RSA keys: ed25519 isn't a FIPS-140 approved algorithm (yet).
Those are needed for example to push code to their managed git (CodeCommit) and if you want a key added when you launch an EC2 machine and to fetch the Windows password.
But beside the point as we are talking about RSA 2048 here which is in fact "perfectly secure" and the public key is not the part subject to downgrade attacks.
The benefit if you do this is now you can impersonate the key's owner for new connections. So if it's a host key you can pretend to be that host if you're able to get on path between a victim and the real host, if it's a user key you can log in as that user with public key authentication.
But that's an active attack and an expensive key break.
Breaking 1024-bit RSA for HTTPS servers was a much juicier target because you can passively snoop RSA kex in TLS 1.2 and older. But that's not a thing in SSH, it's active attacks only.
My almost 10yo yubi still works just fine.
>The RFC8332 RSA SHA-2 signature algorithms rsa-sha2-256/512. These algorithms have the advantage of using the same key type as "ssh-rsa" but use the safe SHA-2 hash algorithms. These have been supported since OpenSSH 7.2 and are already used by default if the client and server support them.
It's unclear to me whether I'm using SHA1 or SHA2. Running ` ssh -oHostKeyAlgorithms=-ssh-rsa ` against one of my servers works, and I'm sure to have created my key before 2016 when OpenSSH 7.2 was released.
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss>
Which suggests you'll be using rsa-sha2-256 with your client version, or absolutely nothing in the future if you're using one of the older releases such as on MacOS.It seems that this is partially the fault of all the big git hosts "guides" for new beginners.
GitHub's guide shows how to create an RSA key. [3] There's no information about why you would choose RSA or anything else. You're expected to make an RSA key.
Atlassian's guide shows how to create an RSA key. [0] They at least spell out there are other options, but DSA is the first of them, and they don't say anything about the types.
The GitBook isn't as specific in the commands it says to use, but shows RSA as the output. [1]
GitLab actually doesn't recommend RSA, and spells out the choice a bit more than most, but that seems like a recent change. [2] Props to them.
[0] https://confluence.atlassian.com/bitbucketserver/creating-ss...
[1] https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-...
[2] https://docs.gitlab.com/ee/ssh/
[3] https://docs.github.com/en/free-pro-team@latest/github/authe...