ssh-keyscan command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
ssh-keyscan: command not found
or when using sudo you get the following error message
sudo: ssh-keyscan: command not found
Solutions to ssh-keyscan: command not found
How To Fix ssh-keyscan: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu ssh-keyscan is provided by openssh-client package.
openssh-client is:
This is the portable version of OpenSSH, a free implementation of the Secure Shell protocol as specified by the IETF secsh working group.
Ssh (Secure Shell) is a program for logging into a remote machine and for executing commands on a remote machine. It provides secure encrypted communications between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP/IP ports can also be forwarded over the secure channel. It can be used to provide applications with a secure communication channel.
This package provides the ssh, scp and sftp clients, the ssh-agent and ssh-add programs to make public key authentication more convenient, and the ssh-keygen, ssh-keyscan, ssh-copy-id and ssh-argv0 utilities.
In some countries it may be illegal to use any encryption at all without a special permit.
ssh replaces the insecure rsh, rcp and rlogin programs, which are obsolete for most purposes.
To fix this problem, we can install more using the command below.
sudo apt-get -y install openssh-client
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install openssh-client.
sudo apt -y install openssh-client
Or if you have aptitude installed you can use the following command.
sudo aptitude install openssh-client
Summary
In this tutorial we learn how to fix ssh-keyscan command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.