Thank you for your quick response. Everything appears to be working as you described. Keep up the excellent work!
Thanks,
Lucas
-----Original Message-----
From: Peter Moody [mailto:
pe...@hda3.com]
Sent: Friday, July 29, 2016 11:33 AM
To: Lucas Halbert <
lhal...@reverus.com>
Cc:
openssh-...@mindrot.org
Subject: Re: Openssh AuthorizedKeysCommand Inquiry
AuthorizedKeysCommand would point to a script/binary that you write that when run with the configured options, returns what you want the AuthorizedKeysFile to look like for that user. So if you have pubkeys and options stored with your users in ldap in two separate attributes, you should be able to have something like this:
# this is in your sshd_config
AuthorizedKeysCommand /my/authorized_keys_command %u
# and this is the authorized_keys_command script.
#!/bin/sh
$uid=$1
pubkey=$(ldapsearch uid=$uid sshPubkey| grep -v dn | cut -d ':' -f 2)
echo $pubkey