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 Advanced UNIX and Linux questions go here. Expert-to-Expert.

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 03:16 PM
Remote login with VNC Peterh UNIX for Dummies Questions & Answers 1 02-28-2008 03:32 AM
want to do login to remote server with out password prithvi0075 Shell Programming and Scripting 0 07-25-2007 10:28 PM
remote login Raom Shell Programming and Scripting 4 10-14-2005 03:43 AM
remote login through a script ( except rsh) rahma UNIX for Dummies Questions & Answers 3 08-23-2001 01:13 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-12-2008
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
Reply With Quote
Forum Sponsor
  #2  
Old 08-12-2008
Moderator
 

Join Date: Sep 2007
Location: Germany
Posts: 1,031
Post your script here, replace the IP/name, username and pw though Also the error message might help.
Reply With Quote
  #3  
Old 08-12-2008
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>
Reply With Quote
  #4  
Old 08-13-2008
Registered User
 

Join Date: Aug 2008
Location: India
Posts: 4
there's a tool called expect that will automate such scripts.
Reply With Quote
  #5  
Old 08-14-2008
Moderator
 

Join Date: Sep 2007
Location: Germany
Posts: 1,031
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.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 01:31 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0