curl-curl/docs/cmdline-opts/knownhosts.md
Daniel Stenberg 3b18aeb8bd
managen: verify the options used in example lines
Also fix the --knownhosts typo

Follow-up to aae18c4bdc

Reported-by: Daniel Terhorst-North
URL: https://mas.to/@tastapod/115327102344617386
Closes #18884
2025-10-06 23:17:33 +02:00

878 B

c SPDX-License-Identifier Long Arg Protocols Help Category Added Multi See-also Example
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. curl knownhosts <file> SCP SFTP Specify knownhosts path ssh 8.17.0 single
hostpubsha256
hostpubmd5
insecure
key
--knownhosts filename --key here $URL

--knownhosts

When doing SCP and SFTP transfers, curl automatically checks a database containing identification for all hosts it has ever been used with to verify that the host it connects to is the same as previously. Host keys are stored in such a known hosts file. curl uses the ~/.ssh/known_hosts in the user's home directory by default.

This option lets a user specify a specific file to check the host against.

The known hosts check can be disabled with --insecure, but that makes the transfer insecure and is strongly discouraged.