Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-07-2003, 06:33 AM   #1
LQ Newbie
Registered: Oct 2003
Posts: 21

Rep: Reputation: 15
Question sftp-run with a batch?

Hi all

I want to know if it is possible for sftp to be run with a batch file?I've done this with ftp(sending the user-name and password, for automation). Will I be able to do this with sftp?

thanx alot

Old 10-07-2003, 06:41 AM   #2
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
I think you need to use an authorization technique with private/public keys. You can't just provide the password at the command line

I'm not sure how you call ftp from your batch, do you use some IO-redirection for this? Since you're using sftp, you can also try 'ssh', because ssh can be used to start a program at the other host. (defined at the commandline of 'ssh')

An other option that might be interesing is, looking for an way to mount the sftp location. Both 'sshfs', and 'lufs' could do this for you. Then, you can just use it as a part of your file system hierarchy.
Old 10-07-2003, 08:25 AM   #3
LQ Newbie
Registered: Oct 2003
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks dude


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sftp using a batch file JeRrYmAn Linux - Security 2 05-05-2006 11:15 AM
How do I use sftp to upload my web site? (no sftp tar command) johnMG Linux - Networking 6 06-21-2005 10:14 PM
could cron/any batch run at my will sheikhsa Linux - Newbie 2 09-23-2004 09:00 PM
GUI based SFTP programs that run in linux? Lleb_KCir Linux - Software 20 08-25-2004 05:02 PM
Linux box calling a batch script on a windows box to run? Is it possible? joelhop Programming 8 05-17-2004 05:49 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration