An example usage checking the RSA host key of URL: example.com at port: 1234 from a *nix shell follows:
Open Command Prompt: Open the command prompt on your system. On Windows, you can do this by pressing the Windows key, typing "cmd," and selecting "Command Prompt" from the search results. On macOS or Linux, open the terminal application.
Navigate to the Desired Directory: Use the cd command to navigate to the directory where you want to generate the key pair. For example, to navigate to the desktop directory, you can use the command: cd Desktop
Generate the Key
ssh-keyscan -t rsa -p 1234 "domain:example.com"
Key : AATpn1P9jB+cQx9Jq9UeZjA1245X7SBDcRiKh+Sok56VzSw==
You should always pass the key type and port number. This practice helps to avoids ambiguity in the response from the external SFTP server.