Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Scripting with error by connect

Please read FAQ. If that does not help, come back.
GerdRez

Scripting with error by connect

Hi together,

I will synchronize from the local PC (Windows) to an FTP server (Linux) with schedule tasks every 60 min.
I tried to realize with WinSCP scripting.
The connect and the file transfer are working fine with GUI but transferring with the script, I cannot connect.
In the GUI transfer we don't use a key.

The script:
# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open member@192.168.10.10
# Change remote directory
# Force binary mode transfer
option transfer binary
# Download file to the local directory
# get archives/* f:\backups\archives\*
# Delete downloaded files
# rm archives/*
# sync from remote to local
put c:\transfer\ftp\*.* /
# Exit WinSCP
exit

And the log:
Looking up host "192.168.10.10"

Connecting to 192.168.10.10 port 22
Waiting for the server to continue with the initialisation
Detected network event
Detected network event
Server version: SSH-2.0-OpenSSH_3.7.1p2
We claim version: SSH-2.0-WinSCP_release_4.0.7
Using SSH protocol version 2
Waiting for the server to continue with the initialisation
Detected network event
Doing Diffie-Hellman group exchange
Waiting for the server to continue with the initialisation
Detected network event
Doing Diffie-Hellman key exchange
Waiting for the server to continue with the initialisation
Detected network event
Asking user:
Der Rechnerschlüssel des Servers wurde nicht im Speicher gefunden. Es gibt keine Garantie, das der Server wirklich der Rechner ist, mit dem Sie sich verbinden wollten. Der rsa2 Schlüssel-Fingerabdruck des Servers lautet: ssh-rsa 1024 e9:a0:02:1a:e2:43:fa:e2:72:06:23:8e:fd:6f:e7:a9
Wenn Sie diesem Rechner trauen, drücken Sie Ja. Um fortzufahren, ohne den Rechnerschlüssel im Speicher abzulegen, drücken Sie Nein. Um die Verbindung abzubrechen, drücken Sie Abbrechen.
Soll die Verbindung fortgesetzt und der Rechnerschlüssel im Speicher abgelegt werden? ()
Attempt to close connection due to fatal exception:
Rechner-Schlüssel wurde nicht überprüft!
Closing connection.

greetz
Gerd