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

Do you have shell access on the server?
samuelthan

Can't use "CALL FIND" command on script

Hi, I'm basically trying to run a script that deletes remote files that is more then 3 days old, so far getting error message - Authentication Failed while running this command via automatic scripting.

I've checked with the login details, it worked both on windows and on command prompt. Even the log files included at the bottom end indicate that access is granted.



Here's the batch command i ran

"C:\Program Files\WinSCP\WinSCP.exe" "Penson sftp"  /console /script=deleteoldfiles.txt


And the txt file that contained script is as follow

option transfer binary

option batch continue
option confirm off

cd To_Company/TestA/
call find /To_Company/TestA/ -mtime +3 -exec rm -f {} \;



Here are the log file
< 2011-01-06 15:03:01.918 Script: Authenticating...

. 2011-01-06 15:03:01.918 [Shell] Selecting events 63 for socket 1628
. 2011-01-06 15:03:01.918 [Shell] Initialised AES-256 CBC client->server encryption
. 2011-01-06 15:03:01.918 [Shell] Initialised HMAC-SHA1 client->server MAC algorithm
. 2011-01-06 15:03:01.918 [Shell] Waiting for the server to continue with the initialisation
. 2011-01-06 15:03:01.918 [Shell] Looking for incoming data
. 2011-01-06 15:03:01.918 [Shell] Looking for network events
. 2011-01-06 15:03:01.934 [Shell] Detected network event
. 2011-01-06 15:03:01.934 [Shell] Enumerating network events for socket 1628
. 2011-01-06 15:03:01.934 [Shell] Enumerated 1 network events making 1 cumulative events for socket 1628
. 2011-01-06 15:03:01.934 [Shell] Handling network read event on socket 1628 with error 0
. 2011-01-06 15:03:01.934 [Shell] Initialised AES-256 CBC server->client encryption
. 2011-01-06 15:03:01.934 [Shell] Initialised HMAC-SHA1 server->client MAC algorithm
. 2011-01-06 15:03:01.934 [Shell] Waiting for the server to continue with the initialisation
. 2011-01-06 15:03:01.934 [Shell] Looking for incoming data
. 2011-01-06 15:03:01.934 [Shell] Looking for network events
. 2011-01-06 15:03:01.950 [Shell] Detected network event
. 2011-01-06 15:03:01.950 [Shell] Enumerating network events for socket 1628
. 2011-01-06 15:03:01.950 [Shell] Enumerated 1 network events making 1 cumulative events for socket 1628
. 2011-01-06 15:03:01.950 [Shell] Handling network read event on socket 1628 with error 0
! 2011-01-06 15:03:01.950 [Shell] Using username "TEST".
< 2011-01-06 15:03:01.950 Script: Using username "TEST".
. 2011-01-06 15:03:01.950 [Shell] Waiting for the server to continue with the initialisation
. 2011-01-06 15:03:01.950 [Shell] Looking for incoming data
. 2011-01-06 15:03:01.950 [Shell] Looking for network events
. 2011-01-06 15:03:01.981 [Shell] Detected network event
. 2011-01-06 15:03:01.981 [Shell] Enumerating network events for socket 1628
. 2011-01-06 15:03:01.981 [Shell] Enumerated 1 network events making 1 cumulative events for socket 1628
. 2011-01-06 15:03:01.981 [Shell] Handling network read event on socket 1628 with error 0
. 2011-01-06 15:03:01.981 [Shell] Prompt (6, SSH password, , &Password: )
. 2011-01-06 15:03:01.981 [Shell] Using stored password.
< 2011-01-06 15:03:01.981 Script: Authenticating with pre-entered password.
. 2011-01-06 15:03:01.981 [Shell] Sent password
. 2011-01-06 15:03:01.981 [Shell] Waiting for the server to continue with the initialisation
. 2011-01-06 15:03:01.981 [Shell] Looking for incoming data
. 2011-01-06 15:03:01.981 [Shell] Looking for network events
. 2011-01-06 15:03:01.997 [Shell] Detected network event
. 2011-01-06 15:03:01.997 [Shell] Enumerating network events for socket 1628
. 2011-01-06 15:03:01.997 [Shell] Enumerated 1 network events making 1 cumulative events for socket 1628
. 2011-01-06 15:03:01.997 [Shell] Handling network read event on socket 1628 with error 0
. 2011-01-06 15:03:01.997 [Shell] Access granted
. 2011-01-06 15:03:01.997 [Shell] Waiting for the server to continue with the initialisation
. 2011-01-06 15:03:01.997 [Shell] Looking for incoming data
. 2011-01-06 15:03:01.997 [Shell] Looking for network events
. 2011-01-06 15:03:02.012 [Shell] Detected network event
. 2011-01-06 15:03:02.012 [Shell] Enumerating network events for socket 1628
. 2011-01-06 15:03:02.012 [Shell] Enumerated 1 network events making 1 cumulative events for socket 1628
. 2011-01-06 15:03:02.012 [Shell] Handling network read event on socket 1628 with error 0
. 2011-01-06 15:03:02.012 [Shell] Opened channel for session
. 2011-01-06 15:03:02.012 [Shell] Waiting for the server to continue with the initialisation
. 2011-01-06 15:03:02.012 [Shell] Looking for incoming data
. 2011-01-06 15:03:02.012 [Shell] Looking for network events
. 2011-01-06 15:03:02.231 [Shell] Detected network event
. 2011-01-06 15:03:02.231 [Shell] Enumerating network events for socket 1628
. 2011-01-06 15:03:02.231 [Shell] Enumerated 1 network events making 1 cumulative events for socket 1628
. 2011-01-06 15:03:02.231 [Shell] Handling network read event on socket 1628 with error 0
. 2011-01-06 15:03:02.231 [Shell] Selecting events 0 for socket 1628
. 2011-01-06 15:03:02.231 [Shell] Server refused to start a shell/command
. 2011-01-06 15:03:02.231 Script: Failed
. 2011-01-06 15:03:02.231 Session upkeep
. 2011-01-06 15:03:02.231 Looking for network events
. 2011-01-06 15:03:02.231 Timeout waiting for network events



Please advise.
Many thanks