Page 1 of 1

FTP / SFTP setups

Posted: Sun 01 Nov 2009 12:03 am
by weatherhead
Hey Everyone

I have recently move over to a new server which by default only used sftp. Since then I havent been able get cumuls to connect with the sftp or a constructed ftp on the server.

Are there are tips on the specific setup of this i.e. protocols (in the hostname should you put 'ftp.yoursite.com' or 'yoursite.com' or 'sftp.yoursite.com')?

Does SFTP work with cumulus?

I am getting connection timeouts:
FTPLOG
10:56:40:025 ! HighLevelAsync 0
10:56:40:025 ! HighLevelAsync done
10:56:40:029 ! HighLevelAsync 0
10:56:40:264 0260FCE0 TriggerDataSent 1096
10:56:40:504 >|SSH-2.0-OpenSSH_5.1p1 Debian-5ubuntu1|

Realtime FTPLOG
10:56:53:128 ! Aborting
10:56:53:129 ! HighLevelAsync 0
10:56:53:129 ! Abort detected
10:56:53:129 ! HighLevelAsync done
10:57:53:140 ! HighLevelAsync 0
10:57:53:141 TWSocket will connect to 69.164.199.59:22
10:57:53:374 02611210 TriggerDataSent 1192
10:57:53:614 >|SSH-2.0-OpenSSH_5.1p1 Debian-5ubuntu1|


I suspected something might have been awry with my credentials but can login fine with other FTP prpgrams..

Any ideas?

cheers
dann

Re: FTP / SFTP setups

Posted: Sun 01 Nov 2009 2:14 pm
by steve
Cumulus doesn't support Secure FTP. It's possible that Cumulus 2 may do eventually, but I haven't looked into what would be required.

Edit: Are you saying that ftp doesn't work either? Is that what the log above is from? Unfortunately the ftp component's trace isn't always helpful in resolving problems. You could try turning on the debug log and see if Cumulus's own trace has anything useful.

Re: FTP / SFTP setups

Posted: Mon 07 Dec 2009 9:38 pm
by species5618
have a look at http://winscp.net/eng/docs/script_upload_single_file

winSCP can be used to script SFTP
run it by hand once, to allow the SSH key, the it works on it's own

i have successfully used the following script

option batch abort
option confirm off
open User:pass@server
put "localpath\realtime.txt" /remotepath
exit

to update http://blog.species5618.net/bits/CumulusRealtime.html

still working on schedules and stuff, so not real time at the moment
:D

Re: FTP / SFTP setups

Posted: Mon 07 Dec 2009 10:11 pm
by daj
Hi "species5618", and welcome to the forum

I'd be interested to see what solution you come up with for the scheduling element. I've been looking around at a variety of FTP tools to automate uploads, however none seem to have scheduling built in.

using the standard AT command in Windows is fine if you want a once per day, but anything more regularly is not possible so I need a better tool

Keep us updated please

thanks

Re: FTP / SFTP setups

Posted: Tue 08 Dec 2009 12:20 pm
by species5618
The advanced TAB in windows scheduler allows you to repeat a task more often, (every 5 mins for example), inside a once a day schedule

However i have some c# code which allows a simple scheduler to be created and controled by a ini/XML file,
however in Vista and Win7, it runs into issue around improved security, and access to files you want to action, so the service needs to run as a USER or file folder perms need to be amended
I may be able to produce something which monitors for file changes in a set of folders and then SFTPs using winscp
that way scheduling is driven by cumulus (updating files), not a asyncronous process

Time allowing, i may write it all up a bit better

Re: FTP / SFTP setups

Posted: Tue 08 Dec 2009 12:27 pm
by steve
Would it help if there was an option in Cumulus to execute a command (batch file or whatever) after each upload? Where "upload" would include the case where no actual upload takes place, just the files are generated.

Re: FTP / SFTP setups

Posted: Tue 08 Dec 2009 3:00 pm
by daj
species5618 wrote:The advanced TAB in windows scheduler allows you to repeat a task more often, (every 5 mins for example), inside a once a day schedule
Was not aware of that! I use the command line as I am old school :oops: Will check it out

steve wrote:Would it help if there was an option in Cumulus to execute a command (batch file or whatever) after each upload? Where "upload" would include the case where no actual upload takes place, just the files are generated.
Yes, would be great for me. I also want to upload my dayfile once per day, but I can handle that via windows scheduler

Re: FTP / SFTP setups

Posted: Tue 08 Dec 2009 9:28 pm
by species5618
steve wrote:Would it help if there was an option in Cumulus to execute a command (batch file or whatever) after each upload? Where "upload" would include the case where no actual upload takes place, just the files are generated.
oh yes, that would be a great solution,
Not just be limited to SFTP, but anything, push the data out via email, SMS, store in a DB, anything with an API

Re: FTP / SFTP setups

Posted: Wed 09 Dec 2009 3:00 am
by gemini06720
Steve...
...Would it help if there was an option in Cumulus to execute a command (batch file or whatever) after each upload? Where "upload" would include the case where no actual upload takes place, just the files are generated...
Indeed, that would be Grreeeaaaattttt... :P

David...
...I also want to upload my dayfile once per day, but I can handle that via windows scheduler...
Although I have not done/tried it with Windows scheduler, it should be possible for the scheduler to call a batch file (are you old enough to remember the word 'batch' :mrgreen: ) that would use Windows own FTP program... 8-)

As I mentioned in another message (re: Web camera), I have been (and I am still) using Take Command (a Windows 'cmd' replacement which offers a massive superset of 167 commands, 259 functions and 171 system variables) to upload (FTP) files to my Web server...

Re: FTP / SFTP setups

Posted: Wed 09 Dec 2009 3:45 pm
by daj
gemini06720 wrote:David...

Although I have not done/tried it with Windows scheduler, it should be possible for the scheduler to call a batch file (are you old enough to remember the word 'batch' :mrgreen: ) that would use Windows own FTP program... 8-)
Sadly, I am old enough to do batch files. I'm 40 in a few weeks (did I just say that out loud, LOL)

I have written the batch file, and the script for the windows FTP command and it works well

Re: FTP / SFTP setups

Posted: Thu 10 Dec 2009 10:03 am
by gemini06720
daj wrote:Sadly, I am old enough to do batch files. I'm 40 in a few weeks (did I just say that out loud, LOL)
Wow! That is old... :twisted:

You are almost ancient history ... well, not to me, you are still a young man in my eyes ... but again, my eyesight is not as good as it used to be ... darn, you are getting there... :D
daj wrote:I have written the batch file, and the script for the windows FTP command and it works well
I knew you could do it the easy way... Now, I am really proud of you... :mrgreen: