How To Install openssh-ldap-authkeys on CentOS 7

In this tutorial we learn how to install openssh-ldap-authkeys on CentOS 7. openssh-ldap-authkeys is Python script to generate SSH authorized_keys files using an LDAP

Introduction

In this tutorial we learn how to install openssh-ldap-authkeys on CentOS 7.

What is openssh-ldap-authkeys

openssh-ldap-authkeys is an implementation of AuthorizedKeysCommand for OpenSSH 6.9 and newer that allows SSH public keys to be retrieved from an LDAP source. It’s provided for situations where a solution other than 1 users. With SSH keys stored centrally in LDAP, revocation of a compromised key is a quick and painless exercise for the user or IT department. openssh-ldap-authkeys allows shared accounts to be fully auditable as to who used them.

We can use yum or dnf to install openssh-ldap-authkeys on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install openssh-ldap-authkeys.

Install openssh-ldap-authkeys on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install openssh-ldap-authkeys using yum by running the following command:

sudo yum -y install openssh-ldap-authkeys

Install openssh-ldap-authkeys on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install openssh-ldap-authkeys using dnf by running the following command:

sudo dnf -y install openssh-ldap-authkeys

How To Uninstall openssh-ldap-authkeys on CentOS 7

To uninstall only the openssh-ldap-authkeys package we can use the following command:

sudo dnf remove openssh-ldap-authkeys

References

Summary

In this tutorial we learn how to install openssh-ldap-authkeys on CentOS 7 using yum and dnf.