iSeries SFTP

145 pts.
AS/400 FTP
AS/400 security
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/
But with no success........thanks

Software/Hardware used:

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.


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 summary of the problem 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:

The Securing Communications with OpenSSH on IBM i5/OS. 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 guide to installing expect (and tcl) 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.


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

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.

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


Share this item with your network: