문제

I'm trying to open a session with any host key (* wildcard) option as mentioned in the docs page here... But it doesn't work as expected.

...In exceptional situations, when security is not required, you can use value * to accept any hostkey. In this case, script output and log file will include warning about insecure connection...

Logs:

C:\Users\s.mailappan>"C:\Program Files (x86)\WinSCP\WinSCP.com" /console /comman
d "open ssamperf:ssperf123@111.252.2.13 -hostkey=*" "option batch on" "lcd C:\Us
ers\s.mailappan\Documents\Samsung-Sprint\Hourly-Alarm-Logs" "get /home/ssamperf/
PerlScript/Akron_WSS_HOURLYALARMREPORT/LOGS/Akron_WSS1_HOURLYALARMREPORT_NEW.txt
 "  "get /home/ssamperf/PerlScript/Chicago_WSS_HOURLYALARMREPORT/LOGS/Chicago_WS
S1_HOURLYALARMREPORT_NEW.txt " "exit"
Searching for host...
Connecting to host...
Authenticating...
The server's host key was not found in the cache. You have no guarantee that the
 server is the computer you think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 38:b4:75:23:2d:d5:70:2c:ad:c0:d0:e2:9d:2d:72:9e
If you trust this host, press Yes. To connect without adding host key to the cac
he, press No. To abandon the connection press Cancel.
Continue connecting and add host key to the cache?
(Y)es, (N)o, C(a)ncel, (C)opy Key:
도움이 되었습니까?

해결책

The option to use accept-all value (*) for the -hostkey switch is available only since WinSCP 5.2 beta. You are probably using an older version.

See https://winscp.net/tracker/815


Also make sure you understand what you are doing. You are giving up any security by using this switch.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top