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



SFTP isn't the same as FTP. That looks like an FTP script. The user and
password lines aren't doing anything for you. This is what one of our
scripts looks like.

#!/usr/local/bin/expect -f
spawn sftp -oPort=9002 user@67.136.124.49
expect "password:"
send "notthepassword"
expect "sftp>"
send "cd current\n"
expect "sftp>"
send "mget *\n"
expect "sftp>"
send "quit\n"

Take a look at Scott Klement's page on SSH/SFTP
http://www.scottklement.com/openssh/




Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf
Of gio.cot
Sent: Friday, September 29, 2017 6:27 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Help With sFTP

Hi all

I would need help in configuring As400 as client for connecting to an
FTP
server .. what we have done :



We have this CLP




PGM



STRQSH CMD('/QOpenSys/bin/sftp -b+

/tmp/myusr/Test_SFTP.txt FTPSRV')



MONMSG MSGID(QSH0000) EXEC(DO)

SNDMSG MSG('File transfer failed') TOUSR(myusr)

ENDDO



ENDPGM



This is the Test_SFTP.txt




************Inizio dei dati****************

user password

sendpasv

ascii

NAMEFMT 1

lcd /tmp/myusr

cd out/

mget EDI_XXXXX*

QUIT



When I call the clp, I receive :



ServerPermission denied (password,publickey).

Connection closed



Can you help me to find where i'm wrong



Thanks in advance

--
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://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

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.