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



A vendor recently required that we change from FTP to SFTP. I was going to go the same route you did and use a batch sftp script with EXPECT. Then I discovered a Java program that uses the GetJSch class that a contractor wrote for another SFTP connection years ago. I was able to clone this code and get it working. Works great, no issues with authentication using a user id/password. As a side benefit I learned a little bit about Java and how to compile a Java program on the i.

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jay Vaughn
Sent: Tuesday, October 2, 2018 6:55 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Sftp password auth

So I recently developed an application to execute sftp batch commands with password auth using Scott klements guide to using EXPECT
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.scottklement.com%2Fpresentations%2FSetting%2520up%2520and%2520Scripting%2520the%2520OpenSSH%2C%2520SFTP%2520and%2520SCP%2520Utilities%2520on%2520IBM%2520i.pdf&data=02%7C01%7Cchris.wynn%40abmauri.com%7C80773b876e91412899f208d628c28adc%7C39c5be5d25104eee9ca0197a6e89e482%7C0%7C0%7C636741213414419279&sdata=G94Qs%2BqdUaNQmvMAaQBTa6NM9uu6dbkygXGANDY8zoU%3D&reserved=0

It seems to only work for me when sftp'ing to other iseries sftp servers and not non-iseries sftp servers.

My recent research shows another way to do sftp password auth...
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww-01.ibm.com%2Fsupport%2Fdocview.wss%3Fuid%3Dnas8N1022287&data=02%7C01%7Cchris.wynn%40abmauri.com%7C80773b876e91412899f208d628c28adc%7C39c5be5d25104eee9ca0197a6e89e482%7C0%7C0%7C636741213414419279&sdata=TjCs1p%2F5UxV2MS2hxAtpEn5dGTB2D7Ow76lSiaNqlII%3D&reserved=0

What could I be missing with the EXPECT method or is it limited to only iseries to iseries sftp?

Jay
--
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: https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fmidrange-l&data=02%7C01%7Cchris.wynn%40abmauri.com%7C80773b876e91412899f208d628c28adc%7C39c5be5d25104eee9ca0197a6e89e482%7C0%7C0%7C636741213414419279&sdata=AtSk7RWs7Ukw1G6PNxeID8jXDL%2BAjcLzfS5qi5f852o%3D&reserved=0
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fmidrange-l&data=02%7C01%7Cchris.wynn%40abmauri.com%7C80773b876e91412899f208d628c28adc%7C39c5be5d25104eee9ca0197a6e89e482%7C0%7C0%7C636741213414429287&sdata=To%2Fyvp0NipY3Jyyy%2Fys8K%2F4v6LaE%2FS%2BUtLKXtqeSyQQ%3D&reserved=0.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Famzn.to%2F2dEadiD&data=02%7C01%7Cchris.wynn%40abmauri.com%7C80773b876e91412899f208d628c28adc%7C39c5be5d25104eee9ca0197a6e89e482%7C0%7C0%7C636741213414429287&sdata=tH2xI%2BaOK4xkqPD2Yld1uYZ6Idfcq0a7gxjMCaTJRAs%3D&reserved=0
________________________________

The views expressed in this e-mail are the views of the individual and may not reflect the views of the organisation. Associated British Foods accepts no liability for any losses or damages arising from reliance on the information contained in this e-mail. The information contained in this e-mail is confidential, may be legally privileged and is intended solely for use by the individual or organisation to whom it is addressed. E-mail information is subject to copyright and must not be used, disseminated, copied or disclosed to third parties without the written consent of Associated British Foods. If you are not the intended recipient you should delete this e-mail, destroy all copies and inform the administrator: admin@xxxxxxxxxxx. Copyright Associated British Foods plc. All Rights Reserved.

Registered Office: Weston Centre, 10 Grosvenor Street, London, W1K 4QY. A limited company registered in England 293262

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.