I would like to enable the following: Linux ec2 instances in AWS that perform LDAP authentication of users who have no home directory currently on the box. I have a working openLDAP in AWS for the task
Once LDAP authenticated:
- The user's home directory will get created
- The user's public ssh key is retrieved from their
sshPublicKeyattribute in LDAP and they can only log on if their local sshPrivateKey matches
I know how to do LDAP auth OR retrieval of public key via an
ldapsearch but I want to do both.
The scenario I am trying to mitigate against is when an employee leaves the company: I can just disable their account in openLDAP and even if their public key exists on machines, they won't be able to use them because they will also fail ldap auth.
I've hunted round on StackExchanges and don't think I've found what I'm looking for. The closest I've come is