Live data from Hacker News

Show HN: My SSH server knows who you are

blog.filippo.io

121–130 of 257 posts

Re: Show HN: My SSH server knows who you are

#121
post #110
post #52

Earlier quoted context omitted.

> By the way, did you know that GitHub publishes all users' ssh public keys and Ben (benjojo.co.uk) grabbed them all? > That's pretty handy at times :) But not this time :( >Better luck next time, I guess :) Who cares if they publish Public Keys. They're meant to be public, it's one of the few well named things in computer science. They are basically meant to be spewn everywhere.

What server owner didn't know before you visited was which IP corresponded to your public key.

Tor exit ;)

Re: Show HN: My SSH server knows who you are

#122
post #13

I use putty, this failed.

Strictly speaking, it didn't fail; PuTTY on Windows works a bit differently from command-line ssh on OS X/Linux, and doesn't show you everything. It brings you directly to a "login as:" prompt after throwing up a dialog about missing/unknown keys. What you were supposed to see never made it to the screen.

Worked fine on my PuTTY, got the message after leaving an empty user at the "login as:" prompt

Re: Show HN: My SSH server knows who you are

#124
post #52

Earlier quoted context omitted.

> By the way, did you know that GitHub publishes all users' ssh public keys and Ben (benjojo.co.uk) grabbed them all? > That's pretty handy at times :) But not this time :( >Better luck next time, I guess :) Who cares if they publish Public Keys. They're meant to be public, it's one of the few well named things in computer science. They are basically meant to be spewn everywhere.

You may be interested in knowing that you can DOS someone if you know only their public keys. https://medium.com/@gmalette/mistaking-authentication-for-id...

You can dos someone just by knowing their ip or how to get a hold of them. You can also sign up magazines to be delivered to their office address and DOS their workplace.

Public keys are supposed to be public.

Re: Show HN: My SSH server knows who you are

#126
post #8

Forgive me ignorance here but what steps should I take to avoid someone from getting my public key off github and then using it to screw with my repos? Was there a major step I missed here when I made these keys?

It's a public key for a reason. You need to the private key to authenticate, so you're safe having everyone know your public key.

> It's a public key for a reason

It's public key because it's named such in the context of public key cryptography. But not all public keys should be available to public.

Ideally by default ssh client should use a different key pair for each server('s public key) it connects to. Some people want to hide their identity, for example Tox people chose to be anonymous, what SSH does goes against expectations so it has the ability to betray their choice.

Re: Show HN: My SSH server knows who you are

#127
post #97
post #44

Earlier quoted context omitted.

It's fairly pointless of github to publish your public key though. Nobody can trust that it's actually yours.

> It's fairly pointless If it enables security research it's already a win in my eyes. Might expose classes of weak keys in the future for example.

Great point. That's already happened, and a lot of weak keys were found [0].

[0] https://blog.benjojo.co.uk/post/auditing-github-users-keys

Re: Show HN: My SSH server knows who you are

#129

This is clever, and very sneaky! Let's say I downloaded every public key from GitHub to ~/.ssh. Would this identify me as everyone on GitHub, or just the owner of the first public key to match? Furthermore, I wonder how Go channels compare to libevent (more specifically, epoll/queue) for high-performance network software. Is there any previous work which compares the two?

Adding those public keys would not identify you as everyone, as you do not have all the matching private keys.

Re: Show HN: My SSH server knows who you are

#130

Earlier quoted context omitted.

> (And if you have agent forwarding active I show you a big WARNING [0].) It amazes me that people enable that for random servers. Seems like SSH should make that harder. Enabling it for a specific server you trust makes sense; enabling it for all servers doesn't. SSH could reject "ForwardAgent" outside a Host block, for instance, and force you to at least write a "Host *" block. EDIT: Check out this search: https://…

For those who don't get why this is terrible, imagine if GitHub were compromised and their ssh agent tampered with. When you clone a repo, they could use your forwarded agent to log into your production hosts. That's pretty bad.

I don't fully understand how this would work - the key being "forwarded agent". My (poor) understanding is that in order for compromised github to get to a host I'm connected to they would somehow need to invoke ssh on my host, somehow. The only way that would not be the case is if ssh maintains an in-memory persistent thing that a) maintains connections to foreign hosts, and b) can somehow be signaled from active connections. If that's true, then a) I didn't realize it could do that, and b) it would be quite handy sometimes, although the security implications are rather serious.
Post reply on HN