Hi Martin,
I have tried a script and passed the private key in /privatekey.
winscp3.exe /console scp://xxx@ftp.xxx.org:xx /privatekey=privatekey.ppk /script=myscript.txt /log=myscript.log
The script works perfectly through the scheduled task on my own computer. However, when we tried to run the script on our cluster ftp server, the script runs but it does not read the private key file. Below is the log message that did not read the key file. Could you please help to figure why the difference?
WinSCP Version 3.8.1 (Build 328) (OS 5.0.2195 Service Pack 4)
Login time: Monday, June 12, 2006 5:45:00 AM
--------------------------------------------------------------.
Session name: xxx@ftp.xxx.org
Host name: ftp.xxx.org (Port: xx)
User name: xxx (Password: No, Key file: No)
Transfer Protocol: SCP
SSH protocol version: 2; Compression: No
Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
Ciphers: aes,blowfish,3des,WARN,des; Ssh2DES: No
Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
SSH Bugs: -,-,-,-,-,-,-,-
SFTP Bugs: -,-,-
Proxy: none
Return code variable: Autodetect; Lookup user groups: Yes
Shell: default, EOL: 0
Local directory: default, Remote directory: home, Update: No, Cache: Yes
Cache directory changes: Yes, Permanent: Yes
Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
--------------------------------------------------------------------------
Looking up host "ftp.xxx.org"
Connecting to xxx.xxx.xxx.xx port xx
Server version: SSH-2.0-Sun_SSH_1.0.1
We believe remote version has SSH-2 rekey bug
We claim version: SSH-2.0-WinSCP_release_3.8.1
Using SSH protocol version 2
Using Diffie-Hellman with standard group "group1"
Doing Diffie-Hellman key exchange
Asking user:
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 xxxx xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
Continue connecting and add host key to the cache? ()
Thank you in advance!!!
Hanna