Live data from Hacker News

Ask HN: How do you manage SSH keys and SSL certificates in your company?

news.ycombinator.com

21–30 of 114 posts

Re: Ask HN: How do you manage SSH keys and SSL certificates in your company?

#21
post #16

The sysadmin just adds each employee's key to the servers. From reading this thread it sounds like bad practice?

Do you know how the sysadmin organizes himself? Is there a process where he gets notified of leaving engineers to remove their keys?

edit: typo

Re: Ask HN: How do you manage SSH keys and SSL certificates in your company?

#22
post #9

We use Yubikeys as GPG smartcards, and use them for gpg-agent as ssh keys. Everyone puts their hsm keys on their github account (and removes all others). We fetch the keys for each user from github on system init. e.g. https://github.com/sneak.keys When we need to add/remove people, we just update the list of usernames in the script that fetches keys, and then kill off instances one at a time to force a redeploy.

A comment above, https://news.ycombinator.com/item?id=14321901, does a similar thing as you, except they use the Github API to fetch the list of usernames. I don't know your use case, but maybe this is useful to you too.

>https://github.com/sneak.keys

How do you do that? I mistook you for a Github employee at first.

Re: Ask HN: How do you manage SSH keys and SSL certificates in your company?

#23
I'm the co-founder of a startup that has developed a tool for this called Userify[1].

It creates and removes local accounts and manages the ssh keys and sudo permissions centrally, so you don't have to worry about not being able to get in if your LDAP/AD is down. (Our Enterprise edition, self-hosted in your VPC or in your DC, can optionally integrate with LDAP or AD for dashboard logins, MFA, etc.) We also have an AWS server edition in the AWS marketplace. When you remove someone in the dashboard, their account is removed across all of the servers they have access to, and their sessions are terminated, but their home directory is retained for archival or forensics.

Our primary foci are paranoid levels of security (hardened, all data encrypted at rest with X25519, in motion with TLS), flexibility, and speed: fast to deploy or integrate (w/ ansible, chef, puppet, terraform, cloudformation), and fast to install (milliseconds), with both SaaS/Cloud and self-hosted versions and open source python agent (we call it the 'shim').

We were founded in 2011 and serve thousands of servers and users in real time; I'm first.last at userify for any questions, and/or info at userify.

1. https://userify.com

Re: Ask HN: How do you manage SSH keys and SSL certificates in your company?

#24
post #22
post #9

We use Yubikeys as GPG smartcards, and use them for gpg-agent as ssh keys. Everyone puts their hsm keys on their github account (and removes all others). We fetch the keys for each user from github on system init. e.g. https://github.com/sneak.keys When we need to add/remove people, we just update the list of usernames in the script that fetches keys, and then kill off instances one at a time to force a redeploy.

A comment above, https://news.ycombinator.com/item?id=14321901 , does a similar thing as you, except they use the Github API to fetch the list of usernames. I don't know your use case, but maybe this is useful to you too. > https://github.com/sneak.keys How do you do that? I mistook you for a Github employee at first.

Appending .keys to your Github user profile URL returns SSH keys. Hugely useful in organisations that are using Github for code management already.

Re: Ask HN: How do you manage SSH keys and SSL certificates in your company?

#25

We use Ansible to deploy/manage peoples' SSH keys on our servers. From their laptop or a jumpbox (within the management VLAN) with their personal key (and a passphrase!) they are able to login in to all those servers. So logins are personal (as opposed to shared accounts which have to be updated when people leave). Now when new people arrive or when people leave we just run an Ansible playbook and all our 400+ server…

How do you manage to "remove" SSH keys. Since sensible is stateless, you probably run once for removing and once for adding a new key.

Not the OP, but say you were populating a directory of keys, you would simply remove it via file's state=absent and then repopulate.

Re: Ask HN: How do you manage SSH keys and SSL certificates in your company?

#26

I'm the co-founder of a startup that has developed a tool for this called Userify[1]. It creates and removes local accounts and manages the ssh keys and sudo permissions centrally, so you don't have to worry about not being able to get in if your LDAP/AD is down. (Our Enterprise edition, self-hosted in your VPC or in your DC, can optionally integrate with LDAP or AD for dashboard logins, MFA, etc.) We also have an AW…

[deleted]

Re: Ask HN: How do you manage SSH keys and SSL certificates in your company?

#27
post #14

LDAP as a public key service and servers configured via PAM to use that as source for pub keys. Nothing to distribute. Delete key from LDAP and second later user can't log on any machine. We are analysing teleport ssh suite for possible migration direction. SSL is different story :)

Can anyone log into hosts if LDAP is down? Is that a concern? Is there an easy way to mitigate the concern if you wanted to? Interested in exploring this solution, but worried about the availability risk.

Re: Ask HN: How do you manage SSH keys and SSL certificates in your company?

#28
post #22
post #9

We use Yubikeys as GPG smartcards, and use them for gpg-agent as ssh keys. Everyone puts their hsm keys on their github account (and removes all others). We fetch the keys for each user from github on system init. e.g. https://github.com/sneak.keys When we need to add/remove people, we just update the list of usernames in the script that fetches keys, and then kill off instances one at a time to force a redeploy.

A comment above, https://news.ycombinator.com/item?id=14321901 , does a similar thing as you, except they use the Github API to fetch the list of usernames. I don't know your use case, but maybe this is useful to you too. > https://github.com/sneak.keys How do you do that? I mistook you for a Github employee at first.

Just add '.keys' after the profile URL. eg. for me this lists my ssh keys https://github.com/vtsingaras.keys

Re: Ask HN: How do you manage SSH keys and SSL certificates in your company?

#29
post #27
post #14

LDAP as a public key service and servers configured via PAM to use that as source for pub keys. Nothing to distribute. Delete key from LDAP and second later user can't log on any machine. We are analysing teleport ssh suite for possible migration direction. SSL is different story :)

Can anyone log into hosts if LDAP is down? Is that a concern? Is there an easy way to mitigate the concern if you wanted to? Interested in exploring this solution, but worried about the availability risk.

In a Windows environment you mitigate this with multiple Directory servers.

Users can log onto machines if the credentials are cached, I think. Unsure how PAM handles this on Linux.

Re: Ask HN: How do you manage SSH keys and SSL certificates in your company?

#30
post #2

My company Foxpass (YC S15) has a product to manage SSH keys. It serves as access control too -- the keys are only available on the hosts where a user should have access. https://www.foxpass.com/

We've been using Foxpass for more than a year now and can definitely recommend. We have Amazon Machine Images with the required packages installed and configured; we use the web interface to grant/revoke access to users and add SSH keys. So each user logs in as themselves. Aren has been awesome with responding to emails and helping us set it up too.

How does it handle sudoers?
Post reply on HN