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?
If you trust your connection to Github and trust that the person in control of the account is the person the account represents, then why not trust that key?
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.
To make it easier. Your public key is something others would place on their servers to grant you access, and you'll need to have your private key to authenticate.
The host you're connecting to could be able to, force write/destroy your public repos or clone your (and your employer's) private repos given that he knows their paths, eg: github/github. I'd assume that a few companies have a */secrets repo of some sort.
Don't use agent forwarding to any host you don't have exclusive root access to and are 100% sure isn't compromised. Anyone else who is root on a box you SSH to with agent forwarding can authenticate to other servers using your private key while you are connected.
Ooh goodie, we get to re-open the argument about whether it was bad of GitHub to publish the public keys![1] Pick your talking points: "They're called public for a reason.", "This could enable identity tracking.", "If your security model prefers public keys to be kept secret, it's absurd -- security by obscurity.", "This could enable factoring weak keys.", "This is good for security research.", "It's wrong to reveal metadata without consent, even if it doesn't break the crypto."
Comments (245) 68 threads
Earlier commentsNicely presented, Filippo!
IdentitiesOnly yes
to my config file.
If it enables security research it's already a win in my eyes.
Might expose classes of weak keys in the future for example.
Continue this thread — 1 reply
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.
Continue this thread — 3 replies
You could build in another PoC by doing the trick where you hide a command inside the copy-paste version of the ssh command line you gave.[2]
[1] https://news.ycombinator.com/item?id=9645703 [2] https://thejh.net/misc/website-terminal-copy-paste
All comments shown.
Couldn't load more comments. Check your connection and try again.