How To Install libpam-ssh-agent-auth on Ubuntu 18.04

In this tutorial we learn how to install libpam-ssh-agent-auth on Ubuntu 18.04. libpam-ssh-agent-auth is PAM Authentication via forwarded ssh-agent

Introduction

In this tutorial we learn how to install libpam-ssh-agent-auth on Ubuntu 18.04.

What is libpam-ssh-agent-auth

libpam-ssh-agent-auth is:

pam_ssh_agent_auth is a PAM module which permits PAM authentication via your keyring in a forwarded ssh-agent.

This module can be used to provide authentication for anything run locally that supports PAM. It was written specifically with the intention of permitting authentication for sudo without password entry, and also has been proven useful for use with su as an alternative to wheel.

There are three methods to install libpam-ssh-agent-auth on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libpam-ssh-agent-auth Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libpam-ssh-agent-auth using apt-get by running the following command:

sudo apt-get -y install libpam-ssh-agent-auth

Install libpam-ssh-agent-auth Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libpam-ssh-agent-auth using apt by running the following command:

sudo apt -y install libpam-ssh-agent-auth

Install libpam-ssh-agent-auth Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libpam-ssh-agent-auth using aptitude by running the following command:

sudo aptitude -y install libpam-ssh-agent-auth

How To Uninstall libpam-ssh-agent-auth on Ubuntu 18.04

To uninstall only the libpam-ssh-agent-auth package we can use the following command:

sudo apt-get remove libpam-ssh-agent-auth

Uninstall libpam-ssh-agent-auth And Its Dependencies

To uninstall libpam-ssh-agent-auth and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libpam-ssh-agent-auth

Remove libpam-ssh-agent-auth Configurations and Data

To remove libpam-ssh-agent-auth configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libpam-ssh-agent-auth

Remove libpam-ssh-agent-auth configuration, data, and all of its dependencies

We can use the following command to remove libpam-ssh-agent-auth configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libpam-ssh-agent-auth

References

Summary

In this tutorial we learn how to install libpam-ssh-agent-auth package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.