SCP bash script
Kevin Morland <kmorland-/[email protected]>
| Newsgroups | gmane.linux.admin.managers |
|---|---|
| Message-ID | <[email protected]> |
Hello, I am writing a bash script that will scp files from one host to another host. I have scp setup to ask for password. Here is a sample script with a different password and host. When I run the scripted I receive error messages invalid passwd. I am new at writing these types of scripts, any help will be greatly appriated. #!/bin/bash SERVER="ns2.test.net" PASSWORD="test" BACKUP_PATH="/var/backups/" FILENAME="backup_ns1_$(date +%a).tgz" /usr/bin/scp $BACKUP_PATH$FILENAME $SERVER:/var/backups > /dev/null 2&1 $PASSWORD Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ LinuxManagers mailing list - http://www.linuxmanagers.org submissions: LinuxManagers-35TzE1X9F6582KRnZfj+bdi2O/[email protected] subscribe/unsubscribe: http://www.linuxmanagers.org/mailman/listinfo/linuxmanagers