Download your favorite Linux distribution at LQ ISO.
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 11-20-2009, 12:46 AM   #1
LQ Newbie
Registered: Oct 2009
Posts: 21

Rep: Reputation: 0
Shell script using sftp

Hi All,

I want to copy a file from a linux server to a public IP using SFTP.

I want the script for that one.

Thanks in advance
Old 11-20-2009, 01:22 AM   #2
LQ Newbie
Registered: May 2009
Location: the zero world
Distribution: F11, U9.04, Gentoo
Posts: 20

Rep: Reputation: 1
Originally Posted by soumyacs View Post
Hi All,

I want to copy a file from a linux server to a public IP using SFTP.

I want the script for that one.

Thanks in advance
Please paste here whatever you have done so far....
Old 11-20-2009, 02:22 AM   #3
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
Also, it's usually easier to use "scp" in a script instead of "sftp".
Old 11-23-2009, 12:26 AM   #4
Registered: Oct 2006
Location: Costa Rica, Escazu
Distribution: Slackware 12.0 (
Posts: 67

Rep: Reputation: 15
for using sftp in shell script I use /usr/bin/expect .
Old 11-30-2009, 04:51 AM   #5
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
That's nice, but it's not pasting what you have.


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
Automating sftp using a shell script bhandu Linux - Newbie 3 07-17-2007 02:56 AM
SFTP in shell script jantman Linux - Software 3 11-27-2006 11:12 PM
sftp over shell script naughtymutt Linux - General 1 08-20-2004 06:56 AM
using sftp without having a Shell on serverside macone Linux - Security 4 08-09-2002 08:17 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:29 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