How To Install sshfp on Ubuntu 18.04
Introduction
In this tutorial we learn how to install sshfp on Ubuntu 18.04.
What is sshfp
sshfp is:
sshfp generates RFC4255 SSHFP DNS records based on the public keys stored in a known_hosts file, or public keys can be obtained by using ssh-keyscan. Serve these entries from the DNS server for your domain to provide authentication via the ssh VerifyHostKeyDNS option.
This package also includes the dane command to generate IETF DANE WG DNS records.
There are three methods to install sshfp 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 sshfp Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install sshfp using apt-get by running the following command:
sudo apt-get -y install sshfp
Install sshfp Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install sshfp using apt by running the following command:
sudo apt -y install sshfp
Install sshfp 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 sshfp using aptitude by running the following command:
sudo aptitude -y install sshfp
How To Uninstall sshfp on Ubuntu 18.04
To uninstall only the sshfp package we can use the following command:
sudo apt-get remove sshfp
Uninstall sshfp And Its Dependencies
To uninstall sshfp and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove sshfp
Remove sshfp Configurations and Data
To remove sshfp configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge sshfp
Remove sshfp configuration, data, and all of its dependencies
We can use the following command to remove sshfp configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge sshfp
References
Summary
In this tutorial we learn how to install sshfp package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.