*BSD News Article 72309


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!oleane!plug.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.mathworks.com!news2.cais.net!news.cais.net!info.usuhs.mil!hq.hq.af.mil!news
From: sgregory@pubspo.hq.af.mil (Scott Gregory)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: How do I encrypt a password in a sh script
Date: Fri, 28 Jun 1996 18:43:54 GMT
Organization: Departmental Publishing
Lines: 22
Message-ID: <31d42659.26716616@news.hq.af.mil>
NNTP-Posting-Host: sgregory.hq.af.mil
X-Newsreader: Forte Agent .99d/32.182

I have a sh script that FTP's to another machine and downloads some
files.  I currently have the username and password in the script:

ftp -n <<EOF
open foo.bar.com
user foouser foopassword
bin
prompt
mget *
quit
EOF


Is there any way to encrypt the password??  I would like to make it at
least a little difficult for someone to get the password : - )

The script is run as root so its not a problem to change permissions. 

Thanks

Scott