From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20473 invoked from network); 15 May 2008 12:02:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 15 May 2008 12:02:24 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 14022 invoked from network); 15 May 2008 12:02:18 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 15 May 2008 12:02:18 -0000 Received: (qmail 25202 invoked by alias); 15 May 2008 12:02:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25033 Received: (qmail 25178 invoked from network); 15 May 2008 12:02:13 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 15 May 2008 12:02:13 -0000 Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.75]) by bifrost.dotsrc.org (Postfix) with ESMTP id 5803F80589A4 for ; Thu, 15 May 2008 14:02:06 +0200 (CEST) Received: from asmtp012-bge351000 (asmtp012-bge351000 [10.150.69.75]) by smtpoutm.mac.com (Xserve/smtpout012/MantshX 4.0) with ESMTP id m4FC25YP023708 for ; Thu, 15 May 2008 05:02:05 -0700 (PDT) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed Received: from zinn-desktop1.us.randomhouse.com (pool-71-191-51-76.washdc.fios.verizon.net [71.191.51.76]) by asmtp012.mac.com (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPA id <0K0W00LOMS3G3H20@asmtp012.mac.com> for zsh-workers@sunsite.dk; Thu, 15 May 2008 05:02:05 -0700 (PDT) Message-id: <34AE8142-F5DA-44FD-96BA-61BDE12BC74E@mac.com> From: Jaime Vargas To: zsh-workers@sunsite.dk Subject: zpty woes Date: Thu, 15 May 2008 08:02:04 -0400 X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: ClamAV 0.91.2/7128/Thu May 15 12:45:41 2008 on bifrost X-Virus-Status: Clean In the script attached, when trying to follwing line always fails. zpty -r scppty line "*:" || echo "no password asked" && exit It appears that the "password" string from the ssh session is discarded by the psuedo terminal. Is there a way to fix this? or Am I missing something? Thanks, Jaime #SCRIPT FOLLOWS #!/bin/zsh -x zmodload zsh/zpty zpty scppty scp hello.world luser@host:~/ zpty -t scppty || echo "something went wrong" && exit zpty -r scppty line "*:" || echo "no password asked" && exit zpty -w scppty "TopSecret" while zpty -r scppty line; do result+="$line"$'\n' done zpty -d scppty print $result