Posted: 2013-11-29 09:04
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:\>winscp.com /script=FileFTP.txt >FileFTP.log enter...
The script as follows :-
Option batch abort
Option confirm off
I put the same command - winscp.com /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'\winscp.com /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.
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 ?
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.
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.
Location: Prague, Czechia
Just to back up your findings:
You can post new topics in this forum
And it's free!