Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Suggestions for auto-login script for ZSH?



On Mon, 25 Nov 1996, Greg Badros wrote:

> On Mon, 25 Nov 1996, Nate Johnston wrote:
> 
> > Actually, I have found that this is not true.  For example, this works
> > perfectly fine for me:
> > 
> > echo "ftp mywhateverhost
> > $LOGNAME
> > mypassword
> > bin
> > get flotsam.tar
> > bye" > .tmpfile
> > telnet myloginhost < .tmpfile > ftp.log
> 
> And this could be better written using HERE documents as
> 
> telnet myloginhost <<END_OF_SCRIPT > ftp.log
> ftp mywhateverhost
> $LOGNAME
> mypassword
> bin
> get flotsam.tar
> bye
> END_OF_SCRIPT
> 
> But it's a bad idea to have passwords in scripts, or as plaintext
> anywhere (like in .netrc).

Not necessarily; what I used to used to use my .netrc for was automating
logins to anonymous ftp servers, where you password is your e-mail
address, and not exactly sensitive information :)  But if you use ftp very
much, I highly recommend installing ncftp, which you can find on
ftp.probe.net, in /pub/ncftp.  It automatically maintains the equivalent
of a .netrc (although it doesn't record passwords for non-anonymous sites
:).

For hosts that you have an account on, you can create a .rhosts file
(caution:  this can be a security risk; RTFM before trying).  This will
allow you to retrieve files with rcp, and login automatically with rlogin.

____________________________________________________________________________
I. Dwayne Koonce                                   E-mail:  idk@xxxxxxxxxxxx
____________________________________________________________________________
"It's dangerous to be right when the government is wrong."  --Voltaire



Messages sorted by: Reverse Date, Date, Thread, Author