Entries for SSH Public Key in the LDAP Server

For each user SSH key, define an sshPublicKey attribute and set it to the value of the public SSH key for the user. If a user has multiple SSH public keys, define an attribute for each key.

Note: The data of the sshPublicKey attribute must be in PEM format. and be cleared of BEGIN/END comments and newlines. Copy the content of a public key to an editor. Remove the BEGIN and END comments from the file and delete all newlines. The key should be on one line.

Following is a sample of an LDIF file for a user entry that uses the openssh-lpk.openldap.schema file with an LDAP user entry that contains two SSH public keys:

dn: cn=guser,ou=users,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: ldapPublicKey
objectClass: top
cn: guser
sn: userLast
sshPublicKey:: c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBQkl3QUFBSUVBbkRUN09VYWROZmNXdH
pzV0QveFIzWXBYd2VmS3FLbVhaQnRsenlIWVRXTjhoOXZtaHdiY1NlNWVtYWZFeVh1eGJr eXBHRDFMK
0Y1aStVbUZadE1nSUtyblIwQ1hZazhwYmlxeXBSc1J4OXBEQWR5QzRrekZaTEJnQzR 2R3NibjRHTStTZUN
XTVA0Zy9oazRGNFRvWWx6Y0VENTBnaDgzTXVwc1dhOWZaRko4PSBxYXRlc3RAcWFzbGVzOAo=
sshPublicKey:: c3NoLWRzcyBBQUFBQjNOemFDMWtjM01BQUFDQkFLU3gyRGoyRmgyZjY5b0hNU2o2UFo
va3U2ZUJoZlA1enE5UHhUeHBadExXWjlxNFh6NWtkOVFmdzFuZTVNbDhhOHFBSmN2YmFwQStBRG50U2J
0bHZQVFh5MXdObnB2OTUxRjFaYUlMd0ZIejBLUzkxUGJ1aE5ZOE9JbEdJTEY1Q0JraWc2aFFPMXBu
SFJWRlVMMEx0a3lodnI0eG5CYTdqTmtKSm1hQUJpZkJBQUFBRlFEWDc4RlhVdDJpN052QjN4aTRXdG1NbUZ
6OEZ3QUFBSUFIT1JuUE5sdC9qa25mTW4zZWtlQ3ZHbEVrZjdEQlhIRlE4UGdEcmNpNWh0US9NekpjR0tCb2
FXR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