Sysax Product Forums / Sysax FTP Automation / Bugs and Feature Requests / SFTP automation fails
Posted:  05 Oct 2010 16:45
I am running the above on Windows 7, copying data to a Win 2008 R2 server running Sysax server as a service. I have set up the following script:
Code:


setvar ~server_address, "10.251.200.51";
setvar ~server_port, 22;
setvar ~login_name, "svc-sftp-001";
setvar ~login_password, "p0WE5hE!!";
setvar ~backup_sourcepath, "c:\\downloads";
setvar ~backup_destpath, "c:/Newfiles";
#------------------------------------------------------------

# Regular FTP connection is established using ftpconnect command, default port is 21.
# Secure connections using the SSH protocol (also known as SFTP) are established using the ftpconnectssh command, default port is 22.
# Secure connections using the SSL protocol (also known as FTPS) are established using the ftpconnectssl command.
# The ftpconnectsslc command can be used if only the control connection needs to be encrypted using SSL.
# 1st and 2nd argument to the command specifies the IP address and listening port number of the server.
# 3rd and 4th arguments specify the username and password respectively of the user account, it is required for account login.
ftpconnectssh(~server_address, ~server_port, ~login_name, ~login_password);

if ftpresult eq success begin
  # print a message to the user.
  print "command: ftpconnectssh; argument: ", ~server_address, ", ", ~server_port, ", ", ~login_name, ", ", ~login_password, "; status: pass;";


  # The setsource and setdestination commands specify the source path and dest path respectively for synchronization
  # The 1st argument to the above commands is either keyword 'local' or 'remote' depending on whether the path is in the local or remote computer
  # The 2nd argument to the above command specifies the path
  # The 3rd argument to the above command is either keyword 'include' or keyword 'exclude' depending on whether a include list or a exclude list is specified
  # The 4th argument onwards specifes the list specified in the 3rd argument
  setsource local, ~backup_sourcepath, include, "*";

  setdestination remote, ~backup_destpath, remove, "*";

  # The backuprun command synchronizes the folders specified in the setsource and setdestination commands
  # The optional argument to the above command specifies the file property to be compared if a file of same name already exist in the destination path
  # Based on the compared result the program decides whether to skip file transfer, resume file transfer or overwrite the destination file
  # It can be one of the following keywords 'bysize', 'bydate',  'bycrc', 'bymd5' or 'bysha1'
  # If the argument is not specified then backuprun command will overwrite all the destination folder files that exists in both the source folder and the destination folder
  backuprun bydate;

  if backupresult eq success begin
    # print a message to the user.
    print "command: backuprun; argument: bydate; status: pass;";

  end else begin
    # print a message to the user.
    print "command: backuprun; argument: bydate; status: fail;";

  end

end else begin
  # print a message to the user.
  print "command: ftpconnectssh; argument: ", ~server_address, ", ", ~server_port, ", ", ~login_name, ", ", ~login_password, "; status: fail;";

end

ftpdisconnect;

endscript;

I have the following log entry:
Executing script C:\Data\WinSCP_scripts\Sysax.fscr
Script Engine: Line 13: Executing setvar. Parameter(s):  ~server_address  "ip address"
Script Engine: Line 14: Executing setvar. Parameter(s):  ~server_port  22
Script Engine: Line 15: Executing setvar. Parameter(s):  ~login_name  "login ID"
Script Engine: Line 16: Executing setvar. Parameter(s):  ~login_password  "password"
Script Engine: Line 17: Executing setvar. Parameter(s):  ~backup_sourcepath  "c:\downloads"
Script Engine: Line 18: Executing setvar. Parameter(s):  ~backup_destpath  "c:/Newfiles"
Script Engine: Line 27: Executing ftpconnectssh. Parameter(s):  ~server_address  ~server_port  ~login_name  (not displayed)
ssh-userauth
An error occured during key exchange expected pass auth
Script Engine: Script command error: Incremented internal error count to 1
command: ftpconnectssh; argument: ip address, 22, login ID, password; status: fail;
Script Engine: Line 66: Executing ftpdisconnect
Script Engine: Script did not complete correctly.
Script completed with an exit code of 1

What am I doing wrong?
Posted:  10 Nov 2010 15:07
sluice, did you get any respond on your issue?
I have the same one.
Support, could you please let uk know how it can be fixed?
We use SysaxAutomation build from 01 Oct 2010.
 

Copyright © 2021 Codeorigin, LLC - All Rights Reserved.
XML RSS 2.0 XML Atom 1.0