The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Remote login through ssh subin_bala Shell Programming and Scripting 5 08-14-2008 07:16 PM
Remote login with VNC Peterh UNIX for Dummies Questions & Answers 1 02-28-2008 06:32 AM
want to do login to remote server with out password prithvi0075 Shell Programming and Scripting 0 07-26-2007 02:28 AM
remote login Raom Shell Programming and Scripting 4 10-14-2005 07:43 AM
remote login through a script ( except rsh) rahma UNIX for Dummies Questions & Answers 3 08-23-2001 05:13 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-12-2008
umathurumella umathurumella is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 6
remote login with out password

HI all,

I need to post some files on to a clients machine and they said we can ftp without username and password. I do the same as a command line it works ftp <hostname>. but when I do that through a script it asks for user name and pasword.

Can any one help me how to do a file ftp.

Thanks in advance
  #2 (permalink)  
Old 08-12-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,311
Post your script here, replace the IP/name, username and pw though Also the error message might help.
  #3 (permalink)  
Old 08-12-2008
umathurumella umathurumella is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 6
awk -f ${AWK_DIR}/exec_out_ftp.awk <${LS_TMPFTP} >${SH_TMPFTP}

BEGIN{ NB=0;
TOPFOUND=0;
HOSTTOPFILE=ENVIRON[ "HOSTTOPFILE" ];
FILES_TO_SKIP=ENVIRON[ "FILES_TO_SKIP" ];
NB_PARAL_FTP=ENVIRON[ "NB_PARAL_FTP" ];
FTP_PARM=ENVIRON[ "FTP_PARM" ];
if (length(FILES_TO_SKIP)==0)
FILES_TO_SKIP=1;
}

{ FILE_SIZE=$2;
FILE_NAME=$1;
}

{ NB++;
TAB_FILE_NAME[NB]=FILE_NAME;
TAB_FILE_SIZE[NB]=FILE_SIZE;
}



END{
start=1;
for (i=NB;i>=start;i--)
{
printf( "sleep 5\n" );
printf( "call wait_for_ftp.sh\n" );
printf( "call exec_one_out_ftp.sh %s %s &\n" , TAB_FILE_NAME[i] , TAB_FILE_S
IZE[i] );
}
printf( "sleep 5\n" );
printf( "echo wait_for_ftp.sh END\n" );
}



there is a dot ftp file which get passed as parameter and the contents in the file are

open <host_name> I also tried ftp <hostname>
  #4 (permalink)  
Old 08-14-2008
bbala bbala is offline
Registered User
  
 

Join Date: Aug 2008
Location: India
Posts: 7
there's a tool called expect that will automate such scripts.
  #5 (permalink)  
Old 08-14-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,311
Looks a bit overpowered and depending on other scripts etc.. Maybe check for here-scripts in this forum or on Google. There are plenty examples.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:19 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0