authentication - sshd Authorized key command not authenticating user -


i'm using simple ad authenticate ssh users on rhel 7.2 server. i've modified schema on ad include ldap parameter sshpublickey , ldappublickey , imported public key ad user.

i can authenticate against ad fine using password login. can return ssh key ad using following command

/usr/bin/sss_ssh_authorizedkeys user@domain.example.com 

i can manually copy returned key /home/user@domain.example.com/.ssh/authorized_keys , can log in absolutely fine.

however when add following sshd_config , restart sshd can't authenticate (just permssion denied)

authorizedkeyscommand /usr/bin/sss_ssh_authorizedkeys authorizedkeyscommanduser root 

to summarise, can authenticate against ad fine using passowrd, can return public key ad fine (and authenticate against key when manaually copy authorized_keys) can't work using sshd's authorizedkeyscommand

turns out there spaces in after authorizedkeyscommand file. noticed starting sshd debug:

systemctl stop sshd /usr/sbin/sshd -d 

i saw when attempting ssh connection:

could not stat authorizedkeyscommand "/usr/bin/sss_ssh_authorizedkeys  ": no such file or directory 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -