Live data from Hacker News

ssh whoami.filippo.io

words.filippo.io

61–70 of 90 posts

Re: ssh whoami.filippo.io

#61

Today I learned that GitHub keeps a publicly accessible list of all pubkeys linked to each user's account.

Seems questionable on Github's part to have .keys public by default, why not allow people to opt in ex: keybase.io equivalent? Yes I get that its not sensitive information, but as this demo demonstrates it can fingerprint people who might not be unaware re: this quirk of SSH's coupled with this part of the Github API.

You can't even opt out of it as far as I can tell.

Re: ssh whoami.filippo.io

#62
post #31

Before SSH-ing into untrusted hosts, make sure you understand what SSH agent-forwarding and X11-forwarding are. Also, maybe don't trust the SSH config defaults on whatever host you're on at the moment. You can explicitly set defaults yourself in your `~/.ssh/config` or similar.

>SSH agent-forwarding and X11-forwarding

Are they enabled by default when running SSH?

Re: ssh whoami.filippo.io

#63
The existence of lesser-known things like this, combined with the defaults of SSH clients, and the rabid promotion of keypair auth instead of passwords, really makes one wonder whether there is some ulterior motive to make it easier to deanonymise and thus track users...

Re: ssh whoami.filippo.io

#64

The existence of lesser-known things like this, combined with the defaults of SSH clients, and the rabid promotion of keypair auth instead of passwords, really makes one wonder whether there is some ulterior motive to make it easier to deanonymise and thus track users...

[deleted]

Re: ssh whoami.filippo.io

#65
post #34
post #28

Earlier quoted context omitted.

The downside is that if you use a large range of servers, you will have to configure them to tell SSH what identities to use. This can be cumbersome if you ssh by alias (e.g. 'foo' rather than 'foo.yourcompany.com'). If you only SSH into servers you trust (a sensible practice) then the benefit is marginal.

Note that it does accept wildcards so you can do rules for *.mycompany.com You can also use placeholders for keys, so for example I have a ssh config like: Host *.mycompany.com # Employer specific yubikey stuff Host *.mydomain.com IdentityFile ~/.ssh/keys/id_primary Host * IdentitiesOnly yes IdentityFile ~/.ssh/keys/%r@%h # uses ~/.ssh/keys/git@github.com for github for example I originally started doing this because…

Additionally, you can also do:

Host foo foo.example.com some.other.alias

Re: ssh whoami.filippo.io

#66

Can you use this to id people for authentication? As in if someone pings your server and you get a key that matches their GitHub is it really that person's key or could they be doing it without having the corresponding private key?

Anyone can download the public key and impersonate that person in a scheme like this.

Re: ssh whoami.filippo.io

#67
I think a lot of people in the comments are missing the fact that public keys are by default intended to be public. This is an explicit and intended property of private-public key cryptography. Your public keys are not a security boundary and setting `IdentitiesOnly` in your SSH configuration does not do anything to strengthen your security posture.

Re: ssh whoami.filippo.io

#68

Today I learned that GitHub keeps a publicly accessible list of all pubkeys linked to each user's account.

Ubuntu Server's installer allows you to import it as the authorized_keys for the new user.

Cloud-init as well. The CLI utility you can use is ssh-import-id.

    ssh-import-id gh:$USERNAME

Re: ssh whoami.filippo.io

#69
post #26
post #24

Just for those curious about it: $ ssh whoami.filippo.io +---------------------------------------------------------------------+ | | | _o/ Hello! | | | | | | Did you know that ssh sends all your public keys to any server | | it tries to authenticate to? You can see yours echoed below. | | | | We tried to use them to lookup your GitHub account, | | but got no match :( | | | | -- Filippo (https://filippo.io) | | | | |…

What, if any, are the downsides to this? Is it just as OP states in article, where you have to interact with the authentication process to provide a key (assuming no key is associated to host as you explain)?

I am more curious what is the upside?

That you trying to SSH into some random server doesn't know that you also use github?

Re: ssh whoami.filippo.io

#70
post #66

Can you use this to id people for authentication? As in if someone pings your server and you get a key that matches their GitHub is it really that person's key or could they be doing it without having the corresponding private key?

Anyone can download the public key and impersonate that person in a scheme like this.

Unless you require them to authenticate using that key (which would obviously require them to have the private key on hand).
Post reply on HN