145 pts.
 Iseries 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:
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
Last Wiki Answer Submitted:  February 17, 2010  12:33 am  by  CharlieBrowne   33,695 pts.
All Answer Wiki Contributors:  CharlieBrowne   33,695 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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

 

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