The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-20-2008
subin_bala subin_bala is offline
Registered User
 

Join Date: Apr 2008
Posts: 46
Replace FTP with SCP

Hi All,

I was using FTP for transferring files from remotemachine.
Code below:

# FTP for Customercare log
#*************************

cd $TRACKING_LOGDIR
ftp -n $CUSTCARE_SERVER << END_INPUT >> $TRACKING_LOGDIR/ftp_custcare.log 2>&1
user $CUSTCARE_USER $CUSTCARE_PWD
asc
cd $CUSTCARE_HOME
prompt
mget $CUSTCARE_LOG.* // getting all log files
mdelete $CUSTCARE_LOG.* // deleting the logfiles after getting
cd arch
mput $CUSTCARE_LOG.* // putting the logfiles to archive directory
bye
END_INPUT


Now i need to replace FTP with SCP.
I have SSH key/certificate authorization for login.
How can i replace the entire code by SCP?

Thanks and Regards,
Reply With Quote
Forum Sponsor