LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-20-2004, 04:00 AM   #1
naughtymutt
LQ Newbie
 
Registered: Oct 2002
Posts: 23

Rep: Reputation: 15
sftp over shell script


Does anyone have a shell script that will log into a sftp server and download files without asking for a password.

I have written a script it works, but I cant get it to stop asking for the password.
 
Old 08-20-2004, 05:56 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400Reputation: 2400
If you are able to configure public key authentication, you are not asked for a password (this is also true for ssh).

If this is set up you can use the -b option that comes with sftp (see man sftp) to execute commands automatically (although a script will also work, I guess).

Take a look at the following manpages for more detailed information:

sftp
ssh-keygen

Hope this helps.
 
  


Reply


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 02:14 AM
Allowing sftp without giving a shell koningshoed Linux - Security 8 12-14-2005 08:23 PM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
sftp script error JeRrYmAn Linux - Networking 1 11-27-2003 07:21 PM
using sftp without having a Shell on serverside macone Linux - Security 4 08-09-2002 07:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:21 PM.

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