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 07-18-2005, 01:28 PM   #1
LQ Newbie
Registered: Jul 2005
Posts: 1

Rep: Reputation: 0
Using BASH script to transfer a file via (s)ftp

Hi, just had a quick question, I'm no where's near competent with BASH scripting

What I basically am trying to do is automate by sftp connection. From the Command line, I sftp myname@myhost.blah, then enter my password. I can't figure out how to take a BASH variable containing my password and direct it to that waiting input.



sftp myname@myhost.blah
"SEND" $password

If anyone can help me out, that'd be great. Thanks!
Old 07-18-2005, 02:03 PM   #2
Registered: Mar 2005
Location: maryland
Distribution: NetBSD
Posts: 60

Rep: Reputation: 15
does this help
Old 07-19-2005, 04:47 PM   #3
Registered: Jun 2005
Posts: 204

Rep: Reputation: 30
depends on where you are sending it... but you need to run a cron job with all details to automate it. Would recommend using ssh instead of sftp if possible, you can gpg key exchanges and secure passwordless file transfers.



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
cannot transfer (FTP) 10GB file, also scp dont work freebies Linux - Software 2 02-25-2005 12:38 AM
FTP file transfer slowing down doctorwebbox Linux - Software 1 08-09-2004 03:08 AM
ftping from a script file transfer incomplete Pelargonium Linux - Newbie 3 07-29-2004 12:56 PM
need a perlscript to read from a text file and transfer files via ftp cccc Linux - Networking 2 02-21-2004 06:18 PM
A way to script file transfer from Linux to windows? jkcunningham Linux - Networking 11 11-21-2002 07:58 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:01 PM.

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