Running Automatic SFTP From Windows to Linux

Reply

Join Date: Jun 2005
Posts: 2
Reputation: teing is an unknown quantity at this point 
Solved Threads: 0
teing teing is offline Offline
Newbie Poster

Running Automatic SFTP From Windows to Linux

 
0
  #1
Jun 16th, 2005
I want to run a batch file which can connect automatically to SFTP Server running on Linux and can download files from Linux remote side to my local side. Besides that, this file will be scheduled to run automatically on every month. But, I'm facing a problem to connect it automatically? Below is one of my example of testing it:

set username=micro
set password=test
set r_dir=/home/micro/output
set l_dir=c:/temp
set filename=CDR-2005-05.csv
set tempSftpScript=script.batch

echo user %username%_%password%>>%tempSftpScript%
echo cd %r_dir%>>%tempSftpScript%
echo lcd %l_dir%>>%tempSftpScript%
echo get %filename%>>%tempSftpScript%
rem echo bye>>%tempSftpScript%

CALL c:\cygwin\bin\sftp.exe -b:%tempSftpScript% micro@url.com



if I just run the following code:

CALL c:\cygwin\bin\sftp.exe macrolynx@url.com

Then, it can connect automatically but also need to enter password manually.


Is there any way to connect to SFTP and download file automatically from Linux?


Your reply will be appreciated.

Thank You in advance,
Teing
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 781
Reputation: Zachery has a spectacular aura about Zachery has a spectacular aura about 
Solved Threads: 21
Team Colleague
Zachery's Avatar
Zachery Zachery is offline Offline
The Geek Father

Re: Running Automatic SFTP From Windows to Linux

 
0
  #2
Jun 16th, 2005
You could write a shell script and have it run via the cron
Firefox: no, its not the end all solution, it has its own issues and in time it will be just as insecure as IE, when its hit Firefox 6, if it makes it that far. Oh, and AOL pays for it, incase you didn't know.

Microsoft & Windows: If you hate it so much, move to linux, or bsd, or anything else, stop complaning and move on.
Good starting places: Gentoo Novell SUSE Fedora Core Apple
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2
Reputation: teing is an unknown quantity at this point 
Solved Threads: 0
teing teing is offline Offline
Newbie Poster

Re: Running Automatic SFTP From Windows to Linux

 
0
  #3
Jun 17th, 2005
To: Zachery

Thank you for your reply and suggestion. You suggested to write shell scripts & run it via the cron job.

For your information, I have no access permission to the remote server Linux to create cron job due to the server is from the other party. But my task is just want to access to the server and download an csv file to my local side.

I am using windows platform, can i do all this task and run it by shell script?

I'm not very good at Linux, or is it possible to run by batch files?

And, Because of the schedule task is same as cron job, I just think to run the schedule task which will run the shell script/batch file.


Pls: is it possible to give me sample of program which can perform this tasks?


Thanks very much & Apologize for all the disturb & mistake that I have done.



Teing
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 1
Reputation: sneed3 is an unknown quantity at this point 
Solved Threads: 0
sneed3 sneed3 is offline Offline
Newbie Poster

Re: Running Automatic SFTP From Windows to Linux

 
0
  #4
Jun 3rd, 2009
I am trying to setup the same process and having the same issue! Have you discovered a solution?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Windows NT / 2000 / XP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC