05-20-2008
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,
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have an existing FTP script and I am trying to modify this to do SCP rather than FTP. I checked the man help in SCP and still having a hard time doing this...
Current FTP script..
ftp -n << EOF > $LOG_FILE
verbose
open ${SERVER}
$LOGON
cd ${REMOTE_FILE_PATH}
get... (2 Replies)
Discussion started by: madhunk
2 Replies
2. UNIX for Advanced & Expert Users
Hi,
We have some clients who will place huge files in to one of the remote server.
And the shell script written in our local server to retrieve client files (using FTP) placed on one of the remote server of ours by clients.
My question Is there any FTP command/script to check from my local... (1 Reply)
Discussion started by: nmsrao
1 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
My problem is simple. I would like to download the contents of a directory on an ftp site. I can access the site through windows, but there are many files and it would be too tedious to click and download each file. Thus, I am trying to use
scp -r... (5 Replies)
Discussion started by: cpabrego
5 Replies
4. UNIX for Advanced & Expert Users
Hi ,
I want to transfer one file having 6GB(after compression) which is in .cpk format from one server to other server.
I tried scp command as well as FTP and also split the file then transfer the files thru scp command. At last i am facing the data lost and connection lost issue.
Generally it... (2 Replies)
Discussion started by: Sumit sarangi
2 Replies
5. Linux
Hi,
Currently i'm using the folllowing FTP acript and its working.
echo "open $server" > ftp_file
echo "user $user $password" >> ftp_file
echo "cd $remote_dir" >> ftp_file
echo "lcd $local_dir" >> ftp_file
echo "put $file">> ftp_file
echo "bye" >> ftp_file
ftp -nv < ftp_file
I've... (1 Reply)
Discussion started by: vickramshetty
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
How to use ftp/scp command with password containing @ symbol.
Ex: ftp xyz:xyz@sun@11.211.111.11:/export/backups/
Exception I got: unknown host or invalid literal address
Note: I dont want to change the password.
Regards,
Vinodh' Kumar (5 Replies)
Discussion started by: vino_hymi
5 Replies
7. HP-UX
Hello All,
I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir.
rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed.
Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies
8. Shell Programming and Scripting
Hi,
I have a process which FTP's the files from one server to another server.
Sometimes only half or a part of the file is delivered to remote location, but on the end log says FTP is successful. But ideally file in full is not delivered to remote location.
How can i catch these kind of errors... (2 Replies)
Discussion started by: forums123456
2 Replies
9. Shell Programming and Scripting
Hi Team,
When an FTP is success, code 226 is returned.
Is there a possibility of return of code 226, when a part of file is transmitted to remote server.
SCP do not return any codes but exit with status 0. This is what i found after executing SCP with verbose option.
Is there a possibily... (2 Replies)
Discussion started by: forums123456
2 Replies
10. UNIX for Dummies Questions & Answers
Hi All,
I am in the process of replacing SFTP instead of FTP to make data more secure. In one of my FTP script I have Quote Site command. I would like to know, what is the option to replace this in SFTP
ftp -n -v <<! | tee -a $LOG | grep "Transfer complete" >/dev/null
open... (3 Replies)
Discussion started by: desai.vishnu
3 Replies