4 ms·
Anybody here have experience with storing SSH public keys in LDAP or an alternative to syncing them across a range of servers? I've had LDAP authentication to
by koolba 10y ago
Anybody here have experience with storing SSH public keys in LDAP or an alternative to syncing them across a range of servers?
I've had LDAP authentication to servers but it's always been with passwords.
- scivey7 10y agoI just recently had to solve this problem. I ended up using this Python package: https://github.com/jirutka/ssh-ldap-pubkey https://github.com/jirutka/ssh-ldap-pubkey
- koolba 10y agoAh very nice! This is exactly what I'm looking for. Couple questions. Does this support multiple sshPublicKey attributes or just one per user? Any performance issues with constantly hitting LDAP?
- scivey7 10y agoMultiple keys seem to be fine. I haven't seen performance issues, but it's a relatively small deployment in the scheme of things. There are also existing solutions for caching here. NSCD seems to be the go-to for caching LDAP query results directly. Alternately, you could cache credentials at the PAM level with pam-ccreds (Debian package name).
- stephenr 10y agoI've done this, and it works well. I used NSS-PAM-LDAPD [1], and openssh-ldap-publickey [2] with OpenLDAP If you want more info about the setup ping me (email in my profile). 1: https://arthurdejong.org/nss-pam-ldapd/ https://arthurdejong.org/nss-pam-ldapd/ 2: https://github.com/AndriiGrytsenko/openssh-ldap-publickey https://github.com/AndriiGrytsenko/openssh-ldap-publickey