|
Can you post your expect script?
-----Original Message-----
From: John McKee <jmmckee@xxxxxxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Sent: Tue, 10 Mar 2009 2:27 pm
Subject: Expect scripting error
Following Scott' examples, I have been trying to get a script to connect to a
remote site for sftp. It isn't working right, but, at least, it is not locking
up the remote system either.
First, from working with scripting in the past, I assumed that the search
pattern does not have to be the entire string. In this case, the remote site
sends back a rather long user name, followed by 's password:. I have tried
running this with the entire user name as well as just password:.
I get the same error each time. My first thought is that something else is
missing.
Anyway, this is what I receive in stderr:
spawn: returns {494}
expect: does "" (spawn_id exp3) match glob pattern "password:"? no
expect: does "sh: /usr/local/bin/stty: not found.\r\n" (spawn_id ex
expect: does "sh: /usr/local/bin/stty: not found.\r\nConnecting to
expect: does "sh: /usr/local/bin/stty: not found.\r\nConnecting to
expect: does "sh: /usr/local/bin/stty: not found.\r\nConnecting to
expect: timed out
My questions:
1) I have logged in manually, and I can confirm that the trainilg part of the
password prompt is indeed password:. So what is the expect trying to tell me
when it tates that the pattern does not match?
2) Notice a little further down the not found related to /usr/local/bin/stty? I
have Cygwin on my desktop. Looking for stty, it is in /usr/bin. But, even
looking there on the i, I do not see it.
Any thoughts?
Thanks.
John McKee
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.