delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <3D2228AE.B0907091@noaa.gov> |
Date: | Tue, 02 Jul 2002 18:26:54 -0400 |
From: | "Arthur Taylor" <Arthur DOT Taylor AT noaa DOT gov> |
Organization: | DOC/NOAA/NWS - National Weather Service |
X-Sender: | "Arthur.Taylor" <Arthur DOT Taylor AT hqmail DOT nws DOT noaa DOT gov> |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Expect and ssh |
Someone had a similar issue to this in May... But I didn't see any follow up... I was attempting to have an expect script control an ssh session. It didn't appear to be working from a bash shell (kept timing out, ?because it didn't see the string it was expecting on stdin?), so I ssh'd into a different machine, and the expect script suddenly worked fine. I then ssh'd into my own machine and the expect script again worked fine. For some reason I can't run the expect script from the bash shell, unless I have already ssh'd into the local host. Seems very odd, so I thought I would see if anyone had an idea. Arthur Sample expect script: --------------------- #! /usr/bin/expect -f spawn /usr/bin/ssh <name>@<host> expect "password:" send "<password>\r" expect ">" send "ls -l\r" expect ">" send "exit\r" exit -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |