Iseries SFTP

145 pts.
Tags:
AS/400 FTP
AS/400 security
SFTP
Can you please tell me the format for the sftp command to be able to include the username & password.

I have tried something like this

SFTP username/password@servername.com.au

but with no success........thanks

 



Software/Hardware used:
AS/400
ASKED: February 16, 2010  4:58 AM
UPDATED: May 25, 2010  5:37 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

This question was already answered in this forum.
Here is a link to the answer

http://itknowledgeexchange.techtarget.com/itanswers/secure-ftp-on-iseriesas400/

================================================================

Essentially all sftp clients will prompt for profile and password — if they can. One difficulty is that sftp isn’t actually written for AS/400s; they don’t really understand how 5250 workstations work. They expect a Unix-like terminal behavior. Here’s <a href=”http://archive.midrange.com/midrange-l/200812/msg01193.html”>a summary of the problem</a> from Walt Madden, an IBMer involved with PASE and related technologies.

Somewhere I once ran across a way to define 5250 sessions to PASE (maybe even QShell, but I’m not sure that’s very likely) so that they could be used for at least some Unix-y functions. It’d take some focused and possibly detailed searches to find it if it’s still on-line anywhere.

But maybe this series will help with the alternative:

<ul>
<li><a href=”http://archive.midrange.com/midrange-l/200812/msg01209.html”>One guy got sftp to work in batch</a></li><li><a href=”http://archive.midrange.com/midrange-l/200611/msg00856.html”>His inspiration</a></li><li><a href=”http://archive.midrange.com/midrange-l/200609/msg01523.html”>The gritty details</a></li>
</ul>

The <a href=”http://www.redbooks.ibm.com/redpapers/pdfs/redp4163.pdf”>Securing Communications with OpenSSH on IBM i5/OS</a> Redpaper that is referenced in the last item has a few more useful comments on the problem of sftp passwords under i5/OS.

Now, if you really, really want to continue along the way to userid and password rather than going the certificates route, your best bet might be with running “expect” scripts. Here’s a basic <a href=”http://archive.midrange.com/midrange-l/200808/msg00994.html”>guide to installing expect (and tcl)</a> under i5/OS.

When you can’t find info about how to use those or run into scripting or programming bugs, post a new question.

Good luck.

Tom

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Mitchb
    Thanks for the info. I found that if I initially use the ssh command the host access will be setup more clearer when I use the sftp command. However, I found that when I ran the ssh command I got the following error message The specified Password: tcgetattr device does not exist Which seems to be consistent with what you are referring to with 5250 and not vt100. Are you familiar with the type of error message and if there is anything I can do at my end to resolve it?
    145 pointsBadges:
    report
  • wpoulin
    Mitchb, I had the same issue, could not get the Unix box to accept my password from my i5 system. I went down the road of trying to get "expect" to work for me, but with no luck. I finally got the Unix group to accept public key authentication and then things started to click. From there it was easy. Hope this helps, Bill Poulin
    2,480 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following