Script to ftp in to linux then pass reply


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Script to ftp in to linux then pass reply
# 1  
Old 09-17-2012
Script to ftp in to linux then pass reply

Hello,
I have an ftp loop script which I was going to use to login to various Linux systems but as It's my first connection I'm being prompted to add it to the known_hosts. Can this script be modified to reply 'yes' before passing the user/pass ?
Code:
usname="someuser" 
pass="somepass" 
while read i do  ftp -inv "$i"<<END >> testftplog user $usname $pass bye END done < /home/grub1/hosty

Any help appreciated as usual

Cheers

Moderator's Comments:
Mod Comment Please view this code tag video for how to use code tags when posting code and data.

Last edited by vbe; 09-17-2012 at 10:42 AM..
# 2  
Old 09-17-2012
try using this ssh option. -o StrictHostKeyChecking=no
This User Gave Thanks to frank_rizzo For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to pass Oracle SQL output to Linux and back... Help!

Hi all, Hopefully you can help. This is what I'm trying to achieve: Obtain a list of usernames out of an Oracle Database Based on this list, link each username with an Oracle Internet Directory (OID) GUID Using the username and GUID perform a database update for all users Here are the... (7 Replies)
Discussion started by: exm
7 Replies

2. Shell Programming and Scripting

FTP Photo using Linux script

Please provide sample linux shell script to retrieve a photo from a Panasonic Security camera using a http command and then transfer to ftp server. I am using Linux O/S 2.6.32 KERNEL Script steps: Retrieve still picture from a Panasonic camera using the following http command ... (1 Reply)
Discussion started by: Busprotect
1 Replies

3. Post Here to Contact Site Administrators and Moderators

Unable to pass shell script parameter value to awk command in side the same script

Variable I have in my shell script diff=$1$2.diff id=$2 new=new_$diff echo "My id is $1" echo "I want to sync for user account $id" ##awk command I am using is as below cat $diff | awk -F'~' ''$2 == "$id"' {print $0}' > $new I could see value of $id is not passing to the awk... (0 Replies)
Discussion started by: Ashunayak
0 Replies

4. IP Networking

No reply to NDP request from Linux host

Hi, new here. We are attempting to prove that an application will be able to carry IPv6. All is fine with IPv4 but not so much with IPv6. For now, we're just starting to ping between hosts to ensure basic communication. I'll try to put as much info but of course feel free to ask for more. ... (4 Replies)
Discussion started by: SavLou
4 Replies

5. UNIX for Advanced & Expert Users

ftp in shell script from linux to windows XP

Hi, I have 9 different linux based servers and i am automating there healthcheckup by doing ssh and fetching deviations out of it in a single text file. I am doing so by using ssh keygen. I am done with the above part . Now i want to ftp that text file to my windows XP desktop and i want to... (4 Replies)
Discussion started by: gemnian.g
4 Replies

6. Shell Programming and Scripting

How to pass variable to ftp script?

how can I use shell variable inside ftp script as in below:- the case as below:- I have folder names as (Sunday,Monday...etc) and inside these folders I am trying to get files where their names are "mf_usm_ssnc*_mo0'HOUR''MIN'". where HOUR= hour as in `date "+%H"` - 2 MIN= either... (2 Replies)
Discussion started by: ahmad.diab
2 Replies

7. UNIX for Dummies Questions & Answers

ascii FTP from Linux to Linux adding carriage returns

Hi, I've got an issue with a shell script that FTP's a file from one Linux server to another Linux server. My script runs on a Linux server and creates an output file (from a database call), and then FTP's this file to another Linux server. The problem is that, even though the output file... (0 Replies)
Discussion started by: roysterdoyster
0 Replies

8. Shell Programming and Scripting

FTP from Linux to windows server by shell script

Hi, Please advice whether my below requirement is feasible, My requirement : Automated FTP from linux server to windows server using a shell script on every monday. If feasible, please help me how to do this ? Thanks in advance (2 Replies)
Discussion started by: apsprabhu
2 Replies

9. IP Networking

ftp waits for longer time to reply

If i fire followin command on unix (linux/solaris) and windows ftp serverX where serverX is not in the network, it takes more time to get reply on unix(3-4 mins) rather windows(1 min), can anybody tell me why this happens? and how to reduce this time span? (1 Reply)
Discussion started by: amolwar
1 Replies
Login or Register to Ask a Question