update-openssh-known-hosts command not found

In this troubleshooting guide we learn how to fix update-openssh-known-hosts command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

update-openssh-known-hosts: command not found

or when using sudo you get the following error message

sudo: update-openssh-known-hosts: command not found

Solutions to update-openssh-known-hosts: command not found

How To Fix update-openssh-known-hosts: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu update-openssh-known-hosts is provided by openssh-known-hosts package.

openssh-known-hosts is:

This package allows you to download public hostkeys from multiple sources, filter the hostnames coming with them and merge them together into one file for use by OpenSSH. Plugins included:

  • curl (optional GnuPG verification)
  • rsync (optional GnuPG verification)
  • psql
  • symlink New plugins can easily be written.

To fix this problem, we can install more using the command below.

sudo apt-get -y install openssh-known-hosts

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install openssh-known-hosts.

sudo apt -y install openssh-known-hosts

Or if you have aptitude installed you can use the following command.

sudo aptitude install openssh-known-hosts

Summary

In this tutorial we learn how to fix update-openssh-known-hosts command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.