I would like to use a public / private key to connect to a server which using LDAP for authentification. The issue is that the home folder is only mounted after login via AutoFS. How can I store the public key in the LDAP server for a specific user and linux machine to connect passwordless via SSH.
Asked
Active
Viewed 576 times
AuthorizedKeysCommandwhich allows you to configure your sshd daemon to run a specific help program to retrieve the public keys that you/your users would normally store and deploy in a users˜/.ssh/authorized_keysfile. That helper program can query your LDAP servers. – Rob Jul 21 '22 at 14:29sshPublicKeyattribute. Or make a little web service and you can also do things like expire a public key after a certain time to ensure that users regularly rotate their ssh keys. – Rob Jul 21 '22 at 14:47