× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Oh, well that sucks.

I did see one customer make ingenious use of SSH_ASK_PASS in a similar
situation, though.

You can create a script which prints the password to stdout and you can
have ssh/sftp call that:

$ cat my_ask_pass.sh
#!/bin/sh
echo "supersecret"

$ DISPLAY=dummy SSH_ASK_PASS=$PWD/my_ask_pass.sh sftp vendor_system <
sftp_command_script

This is an abuse of SSH_ASK_PASS, which is supposed to call a program
which shows an X11 window that asks the user for the password (thus the
requirement that DISPLAY be set), but instead we're just telling it to
call the program that has the password hard-coded. I'd recommend not using
this unless you can't use SSH keys.



"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 09/07/2016
04:08:08 PM:

From: DrFranken <midrange@xxxxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 09/07/2016 04:08 PM
Subject: Re: SSH keys - was: Re: expect - sometimes it runs
sometimes it doesn't....
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>

Have you talked to this vendor? You seriously have no idea. :-) :-)
We're lucky they got this far!!

To directly answer your question, they don't support key exchange.
UerrID and password only.

The odd part is that it either works flawlessly or appears not to even
make an attempt.

- Larry "DrFranken" Bolhuis

www.Frankeni.com
www.iDevCloud.com - Personal Development IBM i timeshare service.
www.iInTheCloud.com - Commercial IBM i Cloud Hosting.

On 9/7/2016 5:05 PM, Kevin Adler wrote:
Not to sidetrack the conversation, but is there a reason you're not
using
SSH keys and public-key authentication? Then you don't need to get
prompted for a password and don't need expect whatsoever.


"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 09/07/2016
02:58:32 PM:

From: DrFranken <midrange@xxxxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 09/07/2016 02:59 PM
Subject: expect - sometimes it runs sometimes it doesn't....
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>

I am utilizing expect on several different servers. On one of them we
need to sftp two small files up to a service periodically through the
day. When I run the shell script in QSH it will run perfectly. Then I
run it again and it does absolutely nothing. It may be many minutes
before it will run again. Signing off and back on doesn't
consistently
fix it either. When submitted to batch it's the same, it may run and
may

not.

I am redirecting standard output to a log file (> 'output.log') and
when

it runs correctly everything is in it. When it does not run the file
is
correctly time stamped but is empty (0 bytes). Even when it's not
logging it may fail, in that case if it's interactive QSH simply
returns

to the '$' prompt.

IBM i 7.1 with reasonably current PTFs and the latest version of
expect
from ScottKlement.com.

Thoughts??


--

- Larry "DrFranken" Bolhuis

www.Frankeni.com
www.iDevCloud.com - Personal Development IBM i timeshare service.
www.iInTheCloud.com - Commercial IBM i Cloud Hosting.
--
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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.



--
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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.