script did not read the private key file

Advertisement

Hanna
Guest

script did not read the private key file

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

Reply with quote

Advertisement

Guest

This is the difference I found on the key reading --
1. One my own computer, the log message is like this --
. Host key fingerprint is:
. ssh-rsa xxxx xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
. Initialised AES-128 client->server encryption
. Initialised HMAC-SHA1 client->server MAC algorithm
. Initialised AES-128 server->client encryption
. Initialised HMAC-SHA1 server->client MAC algorithm
! Using username "xxxxxx".
. Reading private key file "privatekey.ppk"
. Offered public key
. Offer of public key accepted
! Authenticating with public key "dsa-key-20060523".
. Access granted
. Opened channel for session
. Started a shell/command

2. On the cluster server, the log message is like this --
. 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? ()
---END of Log---

ALSO: The script ran succseefully by manually double click the batch file. But it failed and did not read key file if ran the batch file from a Windows Scheduled Task.

Any idea? :? Thanks!

Reply with quote

Hanna
Guest

Thanks and yes the FAQ is very helpful :D
We copied the ini file over to the server and the problem is resolved!

Thanks again for helping!

Hanna

Reply with quote

Advertisement

You can post new topics in this forum