To automate the "trust" process for a new server, append the output directly to your local database: ssh-keyscan example.com >> ~/.ssh/known_hosts Use code with caution.
If you use GUI-based tools like PuTTY or WinSCP , the process is usually handled during the first connection. ssh download host key
Similar to PuTTY, WinSCP prompts you to verify the host key on the first login. You can also import these keys from PuTTY sessions by checking the "Import cached host keys" option during setup. Locating Host Keys Directly on the Server To automate the "trust" process for a new
how to backup/restore the host key in ssh server - Ask Ubuntu You can also import these keys from PuTTY
If you are on a Linux, macOS, or Windows (via PowerShell/CMD) machine, the standard way to download a host's public key without logging in is using the ssh-keyscan utility. 1. Use ssh-keyscan (Recommended)
When you first connect, a security alert pops up showing the key fingerprint. Clicking "Accept" effectively "downloads" and stores that key in the Windows Registry for future use.