Thanks a lot, it's a good starting point. At first, config was read out from registry. Now I exported settings to .ini and moved into WinSCP folder.
. 2017-05-09 13:01:22.093 Configuration: c:\backup\WinSCP\WinSCP.ini
Also I exported pub hostkey with ssh-keyXXXgen -l -f /etc/ssh/ssh_host_rsa_key.pub
and put it in the command:
"c:\backup\WinSCP\winscp.com" /command "open sftp://root:root@server/ -hostkey=""ssh-rsa 2048 1g:f3:e2:bc:35:ff:19:2f:a6:6f:d1:82:e6:af:1c:9c""" "put c:\AIC_Backup\Archive\AIC_Backup.7z /data1/backup/AIC/AIC_Backup.7z" "exit" "/log=AICBackup.log" "/loglevel=1"
The showen key is the same as the GUI shows before firs connect (eg. https://winscp.net/eng/data/media/screenshots/unknown_hostkey.png
But scheduled task still doesn't work :( No log records for winscp command, just from .bat (>>%logfile% 2>&1 ) . In attachhemt I upoladed the log when I run it with clicking on backup.bat. Do you see maybe anything wrong in it?
I'll keep checking for the issue. Thanks