Post a reply

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)


Topic review


Schedule Script Help

Hi All,
I nearly have this cracked.
I'm trying to connect to an SFTP location & PUT a file & create a log.
Then schedule the task using the AT command.
I have tested from the C:\ command prompt & all works fine.

eg C:\> /script=FileFTP.txt >FileFTP.log enter...
The script as follows :-

Option batch abort
Option confirm off
Open sftp://Myusername:Password9@151.234.567.89:22
Put File1.dat

I put the same command - /script=FileFTP.txt >FileFTP.log - in a .CMD file & scheduled it using AT time /e:m,t,w,th,f FileFTP.cmd

I also tried scheduling the command in double quotes - AT 12:00 "c:\'Path'\ /script=FileFTP.txt >FileFTP.log"

The command line version works & creates an output file - the scheduled versions do nothing.
Hopefully I'm missing something simple...
Thanks in advance for any help.
Kind Regards

I have progressed a bit...

I got a log file today when I ATd, (scheduled), the cmd file.
How do I accept this ssh-rsa fingerprint in a script ?

batch abort
confirm off
Searching for host...
Connecting to host...
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 1024 01:12:2e:76:19:1b:8t:7c:12:30:09:27:f3:93:03:37
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?
(Y)es, (N)o, C(a)ncel, (C)opy Key: Cancel
Host key wasn't verified!
Host key fingerprint is ssh-rsa 1024 0b:18:2e:75:18:1f:8f:6c:02:50:09:27:f3:93:03:37.

Authentication failed.
I'm answering my own questions here.... Patience is a virtue....
I got it sorted - just had to add the remote FTP server ssh-rsa fingerprint to the open line.
ie. Open sftp://Myusername:Password9@151.234.567.89:22 -host= "ssh-rsa 1024 0b:18:2e:75 etc etc etc etc etc.