![Forrest logo](/images/logo.png)
ssh:tldr:3f002
ssh: Retrieve all public ssh keys of a remote host.
$ ssh-keyscan ${host}
try on your machine
The command "ssh-keyscan ${host}" is used to gather the public SSH host key of a remote server. Here is a breakdown of each component:
-
ssh-keyscan
: This is the command-line utility that is used to fetch the public SSH host key of a remote server. -
${host}
: This is a placeholder for the hostname or IP address of the remote server that you want to scan for its public SSH key. You need to replace${host}
with the actual hostname or IP address.
When you execute this command, it will connect to the specified remote server and retrieve its public SSH host key. The public key can be used to verify the authenticity of the remote server when you want to establish an SSH connection. The fetched key will be printed to the terminal.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.