How To Install keychain on Debian 9
Introduction
In this tutorial we learn how to install keychain
on Debian 9.
What is keychain
keychain is:
Keychain is an OpenSSH key manager, typically run from ~/.bash_profile. When keychain is run, it checks for a running ssh-agent, otherwise it starts one. It saves the ssh-agent environment variables to ~/.keychain/${HOSTNAME}-sh, so that subsequent logins and non-interactive shells such as cron jobs can source the file and make passwordless ssh connections. In addition, when keychain runs, it verifies that the key files specified on the command-line are known to ssh-agent, otherwise it loads them, prompting you for a password if necessary.
There are three methods to install keychain
on Debian 9. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install keychain Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install keychain
using apt-get
by running the following command:
sudo apt-get -y install keychain
Install keychain Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install keychain
using apt
by running the following command:
sudo apt -y install keychain
Install keychain 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 Debian. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install keychain
using aptitude
by running the following command:
sudo aptitude -y install keychain
How To Uninstall keychain on Debian 9
To uninstall only the keychain
package we can use the following command:
sudo apt-get remove keychain
Uninstall keychain And Its Dependencies
To uninstall keychain
and its dependencies that are no longer needed by Debian 9, we can use the command below:
sudo apt-get -y autoremove keychain
Remove keychain Configurations and Data
To remove keychain
configuration and data from Debian 9 we can use the following command:
sudo apt-get -y purge keychain
Remove keychain configuration, data, and all of its dependencies
We can use the following command to remove keychain
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge keychain
Dependencies
keychain have the following dependencies:
References
Summary
In this tutorial we learn how to install keychain
package on Debian 9 using different package management tools: apt
, apt-get
and aptitude
.