Summary: SCP bash script /w problem

Kevin Morland <kmorland-/[email protected]>
Newsgroups gmane.linux.admin.managers
Message-ID <[email protected]>
Summary of SCP bash script.  Thanks to the numerous responses, to many to list.
 
The solution was DSA with SSH, require no passwd.  A backup user was created, then permissions set for that user.  That was the general consensus.
 
Steps: 
1)Create backup user.
2)Setup permissions for that user
3)Create DSA SSH connections, checkout the link: http://www.bluegum.com/Software/ssh-auth.html
4)Insert scripts into crontab
5)Test
 
Now for the problem, the /home backup is 1.2G tarred and zip (tar czf).  When the script runs to copy the file, the script continues to run on the server receiving the file.  The server sending the file the script exits and closes properly.  The receiving server keeps SCP process running for many hours non-stop.  The two servers are in the same LAN.  I can not kill the processes kill -9 will not kill them, the only way to kill them is by a reboot.
 
I have other files being copied over in the same script, size are 1.2Mb, 32Mb, 4k, then the 1.2G file.  All the files move over to the receiving server, just fine retaining the orginal information.  Just the process will not stop running...
 
Any help here is greatly needed as I have trouble shooted and have no answer to the problem.  If any have seen this issue and solved it. 
 
Here is the script:
#!/bin/bash
SERVER="ns2.cswb.net"
BACKUP_PATH="/var/backups/"
FILENAME_ETC="backup_ns1_etc_$(date +%a).tgz"
FILENAME_MAIL="backup_ns1_mail_$(date +%a).tgz"
FILENAME_NAMED="backup_ns1_named_$(date +%a).tgz"
FILENAME_HOME="backup_ns1_home_$(date +%a).tgz"
 
# Copy of /etc ns1.cswb.net backup to ns2.cswb.net server
/usr/bin/scp $BACKUP_PATH$FILENAME_ETC $SERVER:~
 
# Copy of /var/spool/mail ns1.cswb.net backup to ns2.cswb.net server
/usr/bin/scp $BACKUP_PATH$FILENAME_MAIL $SERVER:~
 
# Copy of /var/named ns1.cswb.net backup to ns2.cswb.net server
/usr/bin/scp $BACKUP_PATH$FILENAME_NAMED $SERVER:~

# Copy of /home ns1.cswb.net backup to ns2.cswb.net server
/usr/bin/scp $BACKUP_PATH$FILENAME_HOME $SERVER:~
 
exit 0
The New Yahoo! Shopping - with improved product search
_______________________________________________
LinuxManagers mailing list - http://www.linuxmanagers.org
submissions: LinuxManagers-35TzE1X9F6582KRnZfj+bdi2O/[email protected]
subscribe/unsubscribe: http://www.linuxmanagers.org/mailman/listinfo/linuxmanagers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.