News for hackers. Stuff that matters.
Re:OpenSSH 8.2 by RL_Quine on Friday February 14, 2020 @01:34AM (#22324423)
Just for fun, most users on Github have RSA keys exclusively.

Did you know that your SSH keys are public on Github?

https://github.com/taylorotwell.keys

https://github.com/alexcrichton.keys

https://github.com/andrew.keys

https://github.com/egoist.keys

https://github.com/fabpot.keys

Some of the most popular users even have DSS keys.

Re:OpenSSH 8.2 by zimmerfrei on Friday February 14, 2020 @01:50AM (#22324492)
You are conflating RSA (the algorithm) with "ssh-rsa" (the option of the SSH suite indicating authentication with RSA in combination with SHA-1). They deprecate the latter.

Other options also based on RSA such as "rsa-sha2-256/512" are fine and will remain supported. In other words, the security problem is not with RSA per se.

Having said that, I have not checked whether the people you list have RSA keys bound to SHA-1...

Re:OpenSSH 8.2 by mkj on Friday February 14, 2020 @02:00AM (#22324535)
The keys themselves are not bound to sha1 or sha256. The hash is just used for the ephemeral signatures during authentication (or certificates as mentioned in the release notes). "ssh-rsa" signature scheme at runtime (sha1) will be deprecated, but rsa keys themselves are fine (edit typo name)
Re:OpenSSH 8.2 by tialaramex on Friday February 14, 2020 @02:32AM (#22324685)
Indeed, and so to actually use this $50k attack on SSH you'd need to somehow arrange for your target to pick random numbers you expected so that your attack works. But for clarity, OpenSSH isn't saying this can be used against SSH today - the deprecation is because we should abandon broken hashes before they actually cause us harm, not wait until after. Don't Walk Past.
Re:OpenSSH 8.2 by RL_Quine on Friday February 14, 2020 @03:10AM (#22324843)
People are still obviously using 1024 bit RSA keys which are more of a problem.
Re:OpenSSH 8.2 by xorcist on Friday February 14, 2020 @05:26AM (#22325423)
Right. Most SSH keys are just keys, not hashes. The hash used for key exchange during authentication is something that is enforced by the server (and client) and not a property of the key.

The option in ssh-keygen for a signature algorithm is for signing keys in an SSH CA. This is not something Github supports.

Re:OpenSSH 8.2 by pilif on Friday February 14, 2020 @08:26AM (#22326275)
> This is not something Github supports.

actually, they do now[1], but only for enterprise accounts. Which is a shame - this is useful for "normal people" too.

1: https://help.github.com/en/github/setting-up-and-managing-or...

Re:OpenSSH 8.2 by noodlesUK on Friday February 14, 2020 @03:20AM (#22324895)
With this in mind, can gpg-agent be configured to use a better hash function with its RSA keys for use in SSH?
Re:OpenSSH 8.2 by numlock86 on Friday February 14, 2020 @04:32AM (#22325181)
> Just for fun, most users on Github have RSA keys exclusively.

Rare ecdsa-sha2-nistp256 guy here. I'd welcome Brainpool, but support mostly boils down to NIST compromised curves on the majority of applications. sadface

> Did you know that your SSH keys are public on Github?

Wait, what? Github makes public keys public? Outrageous!

Re:OpenSSH 8.2 by RL_Quine on Friday February 14, 2020 @07:33AM (#22326004)
It's not intuitive because there's really no need for it.
Re:OpenSSH 8.2 by dspillett on Friday February 14, 2020 @09:12AM (#22326663)
No harm in it either though.

Unless for some reason someone imports one into their authorized_keys (which presumably would require deliberate steps not random numbskullary) in which case there is a (low) risk as they have just given a dev access to an account said dev does not know exists.

Re:OpenSSH 8.2 by RL_Quine on Friday February 14, 2020 @09:30AM (#22326820)
What you described is quite literally a feature in Ubuntu Server.

Type in a github username during the installer to import from github.com/%s.keys to /root/.ssh/authorized_keys.

Re:OpenSSH 8.2 by 3fe9a03ccd14ca5 on Friday February 14, 2020 @10:17AM (#22327249)
A cronjob on every one of my IoT crap devices, which sometimes stay stuffed in a shoebox without internet for years:

    @reboot root ssh-import-id gh:my-username
That way when I want to tinker with one, it will pull down my newest GitHub once it reboots and I’ll be able to login. The GitHub key is always up to date.
Re:OpenSSH 8.2 by dspillett on Friday February 14, 2020 @11:00AM (#22327604)
> Type in a github username

Exactly. That would be the deliberate steps I mentioned as a gate for this causing a problem. If you give it someone else's key you have a problem, though a minor one unless you've been conned into doing so by an adversary who will later scan for accounts that allow their key pair for auth.

Importing your own public key this way is not problematical at all.

Of course you might end up with people publishing their private key along with the private one, by error or because it seems convenient & they don't think things through...

Re:OpenSSH 8.2 by tialaramex on Friday February 14, 2020 @10:09AM (#22327167)
My instinct is that's actually safer than a "set your password and open SSH to the world" step.
Re:OpenSSH 8.2 by boring_twenties on Friday February 14, 2020 @02:24PM (#22329439)
The harm is that if you use the same key elsewhere, it can be linked to your github identity.
Re:OpenSSH 8.2 by dspillett on Monday February 17, 2020 @08:25AM (#22347482)
If you are needing to keep your identity hidden/ambiguous, then you need to be careful with your keys. Don't publish a public key if you don't want it to be public!

These keys and the ways people often used them are very much not designed with privacy as a priority: they are explicitly for proving who you are so you can be given access to something. Key management with regard to keeping different concerns separated is up to the user.

Re:OpenSSH 8.2 by boring_twenties on Tuesday February 18, 2020 @10:24PM (#22362810)
I think it's fine as long as you _know_ github is going to make it public. The only problem is that it's not at all obvious, as can be seen in this very thread.
Re:OpenSSH 8.2 by jwilk on Friday February 14, 2020 @09:07AM (#22326611)
Why not ssh-ed25519?
Re:OpenSSH 8.2 by numlock86 on Friday February 14, 2020 @11:10AM (#22327676)
> Why not ssh-ed25519?

> [...] but support mostly boils down to NIST compromised curves on the majority of applications.

I am doing a lot of embedded stuff, and usually all that's supported is RSA ... and NIST curves when it comes to ECC. And I like to keep my key count at 1. Ditching RSA for ECC was a huge step already in that regard.

Re:OpenSSH 8.2 by egyiedfyfrtjjf on Friday February 14, 2020 @01:47AM (#22324475)
As a RSA-user myself, because I learnt about ssh through the github setup guides: Will ssh-keygen generate a secure key if I don’t pass it any parameters?
Re:OpenSSH 8.2 by jlgaddis on Friday February 14, 2020 @02:20PM (#22329401)
It will generate a 2048-bit RSA keypair by default. It will be "a secure key" as long as you protect it with an appropriate passphrase.
Re:OpenSSH 8.2 by gnufx on Friday February 14, 2020 @06:00PM (#22331298)
You need recent ssh-keygen's -o to make the passphprase effective (default for ed25519). That was covered here at some stage, but I don't have a reference.
Re:OpenSSH 8.2 by RL_Quine on Friday February 14, 2020 @01:49AM (#22324485)
I haven't built the new version, but I assume it defaults to ed25519 now. You can otherwise make one with ssh-keygen -t ed25519.
Re:OpenSSH 8.2 by techntoke on Friday February 14, 2020 @05:20AM (#22325396)
Last time I tried AWS doesn't support anything but RSA keys.
Re:OpenSSH 8.2 by zenexer on Friday February 14, 2020 @09:25AM (#22326782)
They don’t need to. Boot up a default AMI, change the key to whatever you want, then create your own custom AMI from that. Or you can use something like Cloud-Init.
Re:OpenSSH 8.2 by lawnchair_larry on Friday February 14, 2020 @01:20PM (#22328779)
This is good news, because AWS will finally be forced to get with the times. Their certificate manager is stuck on RSA too.
Re:OpenSSH 8.2 by RL_Quine on Friday February 14, 2020 @08:35AM (#22326337)
That’s right. Nothing stopping you having both though.
Re:OpenSSH 8.2 by pnutjam on Friday February 14, 2020 @09:12AM (#22326657)
Those are just the public portion of the key, not the private key.
Re:OpenSSH 8.2 by RL_Quine on Friday February 14, 2020 @09:28AM (#22326805)
I didn't say they were private keys.
Re:OpenSSH 8.2 by joeyh on Friday February 14, 2020 @10:54AM (#22327555)
github also appears to only have RSA and DSA host keys, the latter is already deprecated