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



Took another very hard look at my script. I kept wondering why Cygwin had a
different "Connecting to..." string. Answer was painfully obvious when I
looked closer. In Cygwin, i used ftp.xxx.com, but the expect script had only
xxx.com. I can't believe how many times I looked at that and missed it.

So, with that error fixed, I was finally able to login with the script. Small
victory. To give the command something to do on the remote system, I sent it
an 'ls' command. Started feeling better. But, defeat was about to be snatched
from the jaws of victory. For some reason, the remote site began rejecting my
login attempts, stating the (trying from memory) host key was invalid. The
contact on the other side was equally perplexed. We tried a number of things. Nothing worked. Then, he had a talk with some other people. He had requested
that invalid login count be increased to allow this testing. And, that count
was increased. But, another component pushed my IP address into a blacklist
area.

That is fixed, finally.


Here is my latest headache:

In your extremely helpful article, Scott, you have an example where your script
is issuing a put of a constant file name: send "put myfile.csv\n"

Can a parameter value be used instead? I tried: send "ls $1" and the return was
ls 1 not found.

So two possibilities:

1) Some wrapper characters, which I don't remember.
2) Dynamically create the script for each run.

Guess I am asking: Can a command line parameter be passed to a send, and, if
so, what is the format?


Thanks for being so patient. This has been way harder than it should have been.

John McKee

Quoting John McKee <jmmckee@xxxxxxxxxxxxxx>:

I tested from Cygwin becaise that was available, even if in no way ideal.

I am getting lost here. Use putty on my pc to connect to sshd on the
i, so that
sftp sees a real terminal? I don't believe my almighty sysadmin has
configured
sshd, since he only does things HE needs, when HE needs them. I will
Google to
see what has to be done and hope QSECOFR authority is not needed. Talking to
the sysadmin is somewhat less pleasant than some invasive medical procedures.

John McKee

Quoting Scott Klement <midrange-l@xxxxxxxxxxxxxxxx>:

What's the point of testing it from Cygwin?! I thought you wanted to
run this on i?! If it works from FileZilla on your PC, it should also
work from Cygwin on your PC, so that doesn't really tell you much.

Run it interactively on your System i instead of running it via Expect,
and see what you get.

To do that, run the SSHD, and connect to your i via Putty or similar.
Then try running sftp interactively from there.


John McKee wrote:
Not sure I understand about running it interactively. I did see
sometting in
the man page on Cygwiin about interactive. Had not tried adding an 'i'
parameter. I kind of thought that interactive would make it get
cranky, as it
does when trying to run sftp directly does on my session. I will
give that a
try tomorrow.
--
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 thread ...

Follow-Ups:
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.