![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help: Script to edit the hosts, network and eth0 file | Shaikjaveed | Shell Programming and Scripting | 1 | 07-22-2008 04:34 AM |
| ping hosts from config file | za_7565 | Shell Programming and Scripting | 1 | 01-29-2008 05:42 PM |
| Copy a file to multiple hosts | sumsriva | UNIX for Advanced & Expert Users | 5 | 09-18-2007 03:42 AM |
| HOSTS File | cymerman | UNIX for Dummies Questions & Answers | 4 | 01-19-2007 12:26 PM |
| dns and hosts file | rmuhammad | IP Networking | 4 | 11-12-2003 02:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
FTP file to different hosts
Guys hw ya all doing.by the way wrote a script which is below.
f() { for host in hostname1 hostname2; do { #host=hostname1 user = 'rocky' pass = 'rocky' #ftp to particular server ftp -v $host quote USER $user quote PASS $pass bin cd /bin/rocky mkdir rock cd /bin/rocky/rock/ mput file1 bye } done } f I need to ftp to those two servers(hostname1 &hostname2) and put the file (file1) in tht particular path.while iam using this script the script is again asking me for login instead of reading the username and password provided.cn some one help me with this. Thanks fellas CK |
|
||||
|
When I ran the modified script I got the output like this.
OUTPUT: Connected to hostmachine1. 220- _________________________________________________________________ 220 (vsFTPd 1.2.1) 530 Please login with USER and PASS. 530 Please login with USER and PASS. KERBEROS_V4 rejected as an authentication type Name (hostmachine1:rocky): 331 Please specify the password. Password: 530 Login incorrect. Login failed. ?Invalid command 530 Please login with USER and PASS. 530 Please login with USER and PASS. 530 Please login with USER and PASS. 530 Please login with USER and PASS. mput file1? 530 Please login with USER and PASS. Passive mode refused. Turning off passive mode. 530 Please login with USER and PASS. ftp: bind: Address already in use 221 Goodbye. Connected to hostmachine2. 220- _________________________________________________________________ 220- 220 (vsFTPd 1.2.1) 530 Please login with USER and PASS. 530 Please login with USER and PASS. KERBEROS_V4 rejected as an authentication type Name (hostmachine2:rocky): 331 Please specify the password. Password: 530 Login incorrect. Login failed. ?Invalid command 530 Please login with USER and PASS. 530 Please login with USER and PASS. 530 Please login with USER and PASS. 530 Please login with USER and PASS. mput file1? 530 Please login with USER and PASS. Passive mode refused. Turning off passive mode. 530 Please login with USER and PASS. ftp: bind: Address already in use 221 Goodbye. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|