Forrest logo
back to the ssh-keyscan tool

ssh:tldr:49e87

ssh: Retrieve certain types of public ssh keys of a remote host.
$ ssh-keyscan -t ${rsa,dsa,ecdsa,ed25519} ${host}
try on your machine

The ssh-keyscan command is used to gather the public SSH host keys of a remote server.

Here is the breakdown of the command:

  • ssh-keyscan: This is the command itself.
  • -t: This option specifies the type of host key to scan for. In this case, it is set to ${rsa,dsa,ecdsa,ed25519} which means it will scan for RSA, DSA, ECDSA, and Ed25519 host keys. The ${} syntax indicates that it is a variable, and the actual values will be substituted at runtime.
  • ${host}: This is another variable that represents the hostname or IP address of the remote server. It will also be substituted with the actual value at runtime.

Overall, this command is used to retrieve the public SSH host keys of a remote server and can be helpful in verifying the server's identity.

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.
back to the ssh-keyscan tool