tool_getparam: add --knownhosts

To allow users to specify a known hosts file that is not the default
one: ~/.ssh/known_hosts

URL: https://github.com/curl/curl/discussions/18784
Closes #18859
This commit is contained in:
Daniel Stenberg 2025-10-05 23:19:13 +02:00
parent 762ce8801b
commit aae18c4bdc
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
11 changed files with 48 additions and 14 deletions

View file

@ -12,9 +12,6 @@ known_hosts
<server>
sftp
</server>
<precheck>
mkdir -p %PWD/%LOGDIR/test%TESTNUMBER.dir/.ssh
</precheck>
<features>
sftp
!oldlibssh
@ -23,15 +20,12 @@ sftp
SFTP with corrupted known_hosts
</name>
<command>
-u : sftp://%HOSTIP:%SSHPORT/ -l
-u : sftp://%HOSTIP:%SSHPORT/ -l --knownhosts %LOGDIR/known%TESTNUMBER
</command>
<file name="%LOGDIR/test%TESTNUMBER.dir/.ssh/known_hosts">
<file name="%LOGDIR/known%TESTNUMBER">
|1|qy29Y1x/+/F39AzdG5515YSSw+c=|iB2WX5jrU3ZTWc+ZfGau7HHEvBc= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAynDN8cDJ3xNzRjTNNGciSHSxpubxhZ6YnkLdp1TkrGW8n\
R93Ey5VtBeBblYTRlFXBWJgKFcTKBRJ/O4qBZwbUgt10AHj31i6h8NehfT19tR8wG/YCmj3KtYLHmwdzmW1edEL9G2NdX2KiKYv7/zuly3QvmP0QA0NhWkAz0KdWNM=
</file>
<setenv>
CURL_HOME=%PWD/%LOGDIR/test%TESTNUMBER.dir
</setenv>
</client>
# Verify data after the test has been "shot"