![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| SCO Santa Cruz Operation (SCO) was a software company based in Santa Cruz, California which was best known for selling three UNIX variants for Intel x86. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [REQ] Automatic script kill process | onisoc | Shell Programming and Scripting | 3 | 05-25-2009 06:17 AM |
| automatic execution of shell script | rajamohan | Shell Programming and Scripting | 1 | 09-29-2008 06:48 AM |
| Script for automatic count the file i have | summerpeh | SUN Solaris | 13 | 09-05-2008 10:41 AM |
| Automatic script | TShirt | UNIX for Advanced & Expert Users | 5 | 06-05-2008 04:34 AM |
| Automatic login script | dayanand | Shell Programming and Scripting | 3 | 01-08-2006 07:46 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
We are using SCO OS 5.05 server and we are doing a manual ftp to another SCO OS 5.05 server to backup our database.
We are using the Bourne shell. We would like to automate the ftp backup of our database instead of doing it manually. It would be nice to run a script. Also would there be anyway to hide the ftp password? Any tips or help would be appreciated. Please advise and thanks. |
|
|||||
|
You could store the password in a file encrypted by crypt(1) get your script to decrypt it as it uses it, not very secure but it would hide the password from the casual observer.
I've used ftp with an input file to give the commands before, e.g.: Code:
$ cat cmdfile.template open _FTPSERVER_ user _USER_ _PASSWORD_ cd directory binary put tar.gz bye $ Code:
HOST=remote.host.name
USER=whoever
PASSWD=whatever
sed -e 's/_FTPSERVER_/'${HOST}'/' -e 's/_USER_/'${USER}'/' -e 's/_PASSWORD_/'${PASSWD}'/' cmdfile.template > cmdfile
ftp < cmdfile
Code:
$ echo passwdofchoice > clear $ echo keyofchoice > key.file $ crypt `cat key.file` < clear > password.crypt $ rm clear The in the above script "PASSWD=whatever" would change to: Code:
KEY=`cat key.file`
PASSWD=`crypt ${KEY} < password.crypt`
Using scp to transfer files via SSH with passwordless SSH would be preferable and more secure if your ftp server is also running sshd. Last edited by TonyFullerMalv; 06-02-2009 at 06:20 PM.. |
|
||||
|
For FTP passwords, try a .netrc file in $HOME for the FTP user with permissions 600 owned by root.
Code:
man .netrc |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|