From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.6/8.7.3) with ESMTP id JAA10149 for ; Tue, 26 Nov 1996 09:25:39 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id RAA02185; Mon, 25 Nov 1996 17:14:29 -0500 (EST) Resent-Date: Mon, 25 Nov 1996 17:00:10 -0500 (EST) X-Authentication-Warning: faraday.clas.Virginia.EDU: nmj3e owned process doing -bs Date: Mon, 25 Nov 1996 16:57:09 -0500 (EST) From: Nate Johnston X-Sender: nmj3e@faraday.clas.Virginia.EDU To: ZSH Users Subject: Re: Suggestions for auto-login script for ZSH? In-Reply-To: <199611252101.QAA01879@redwood.skiles.gatech.edu> Message-ID: X-URL: http://128.143.22.134/~nmj3e/ MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Resent-Message-ID: <"cY0DJ1.0.YO.gRXco"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/530 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Mon, 25 Nov 1996, Richard Coleman wrote: > > I'm trying to write a script that would allow be to make telnet login (or > > ftp login) processes automated. Here's what I tried: > > > > 1. ftp > > 2. login > > 3. password > > 4. get a particular file > > 5. exit :) > > The problem is that the login process reads the tty directly, > when getting the password. No amount of shell redirection can > get around this. 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 I have seen this used to telnet to port 22 on a random host to sonnect to sendmail and spoof one's return address. For this man, however, that there is a mechanism already created to do what he needs. Look up the man page on the .netrc file. It specifies this sort of information for ftp depending on the hostname - quite convenient, and better than this method. --N.