remote ftp login without 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

Post your script here, replace the IP/name, username and pw though :slight_smile: Also the error message might help.

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 , TAB_FILE_S
IZE );
  }
    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>

there's a tool called expect that will automate such scripts.

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.