Dem slapd das ldapPublicKey-Schema hinzufügen:
apt-get install fusiondirectory-plugin-ssh-schema
schema2ldif /etc/ldap/schema/fusiondirectory/openssh-lpk.schema > /etc/ldap/schema/fusiondirectory/openssh-lpk.ldif
1)
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/fusiondirectory/openssh-lpk.ldif
Dem Benutzer den Schlüssel hinzufügen:
cat <<LDIF > add-sshPublicKey.ldif
dn: uid=$USERNAME,ou=people,$DOMAIN
changeType: modify
add: objectClass
objectClass: ldapPublicKey
-
add: sshPublicKey
sshPublicKey: $(cat ~/.ssh/authorized_keys)
LDIF
sssd konfigurieren:
- /etc/sssd/sssd.conf
…
[sssd]
…
services = nss, pam, ssh
…
sssctl config-check
service sssd restart
sshd konfigurieren:
- /etc/ssh/sshd_config
…
AuthorizedKeysCommand /usr/bin/sss_ssh_authorizedkeys
AuthorizedKeysCommandUser nobody
…
service ssh restart