remote ftp login without password


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users remote ftp login without password
# 1  
Old 08-12-2008
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

Last edited by Yogesh Sawant; 01-07-2011 at 01:20 PM..
# 2  
Old 08-12-2008
Post your script here, replace the IP/name, username and pw though Smilie Also the error message might help.
# 3  
Old 08-12-2008
Code:
awk -f ${AWK_DIR}/exec_out_ftp.awk <${LS_TMPFTP} >${SH_TMPFTP}

Code:
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>

Last edited by Yogesh Sawant; 01-07-2011 at 01:21 PM.. Reason: added code tags
# 4  
Old 08-14-2008
there's a tool called expect that will automate such scripts.
# 5  
Old 08-14-2008
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remote FTP Backup -Tar archive+ encrypt+ split to a remote ftp

I have a huge directoy(200+ gb) for backup. I want upload the tar file(split files) simultaneous to a remote ftp. (pipeline, stdout, stdin etc.) I don't want write a data to local hdd. I have a ssd hdd. thanks. this code doesn't work.( yes i know the problem is split command!) tar cvzf -... (8 Replies)
Discussion started by: tara123
8 Replies

2. Solaris

FTP log only shows FTP LOGIN FROM entry?

OS: Solaris 9 Configuration /etc/syslog.conf daemon.debug /etc/inetd.conf ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd -A -l -d Found the ftp.log only generate those entries from other servers/hosts. Can we trace on all ftp entries either from/to the server? ... (6 Replies)
Discussion started by: KhawHL
6 Replies

3. Shell Programming and Scripting

How to give user name and password in a single command to login to remote server

Hello All, I'm new to unix and i need the below favour from you. I have list of 50 unix server. I need to login to all the server one by one and with the same user and password. I will declare the user name and password globally in the script. for example : servername- hyperV user name... (4 Replies)
Discussion started by: Hari A
4 Replies

4. Solaris

how to login with ssh to remote system with out applying the remote root/usr password

how to login with ssh to remote system with out applying the remote root/user password with rlogin we can ujse .rhosts file but with ssh howits possible plz guide (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

5. Linux

How to find remote Linux box login account without login in to that box?

Hi, How to find remote Linux box login account without login in to that box? I don't have login account at my remote Linux box. But I need who are all having login account. How do I findout? Thanks, --Muthu. (3 Replies)
Discussion started by: Muthuselvan
3 Replies

6. Shell Programming and Scripting

without password to login into remote machine- in the script ??

HI, I need to write a script .. when I run this script , will directly goto that remote machine without asking password.. Once it is entered, I needs to transfer some of the log files... how can I proceed ? (7 Replies)
Discussion started by: hegdeshashi
7 Replies

7. Solaris

SSH Password-less login fails on password expiry.

Hi Gurus I have a few Sol 5.9 servers and i have enabled password less authentication between them for my user ID. Often i have found that when my password has expired,the login fails. Resetting my password reenables the keys. Do i need to do something to avoid this scenario or is this... (2 Replies)
Discussion started by: Renjesh
2 Replies

8. Shell Programming and Scripting

want to do login to remote server with out password

Hi All I am new to Unix. I have write srcipt which will automate the follwing tasks login to F-Secure server over ssh copy file from my local server to that server. Remote server wants to login with out password(ssh-keygen) I am not getting how to write that scirpt Please help me... (0 Replies)
Discussion started by: prithvi0075
0 Replies

9. Shell Programming and Scripting

FTP Script with hidden login name and Password

hi, i need a method to hide the login name and password ....during FTP ....in the script.. thnks (3 Replies)
Discussion started by: scorpiyanz
3 Replies
Login or Register to Ask a Question