1752369 Members
5590 Online
108787 Solutions
New Discussion юеВ

Scripting sftp

 
SOLVED
Go to solution
Jack Trachtman
Super Advisor

Scripting sftp

We would like to use sftp within a DCL
batch script. The programmer who has
tried this has found that he couldn't
pass a password to sftp via the script
(possibly because sftp is written to
expect input from terminals only?)

Can anyone suggest how we might script
sftp and pass it a password? Thanks
4 REPLIES 4
Jim_McKinney
Honored Contributor

Re: Scripting sftp

To script SFTP (MultiNet) and feed it a password in batch mode I had to write a pseudoterminal application.
Karl Rohwedder
Honored Contributor
Solution

Re: Scripting sftp

Pls. check thread
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=985928
where Volker explains the setup for SFTP.

regards Kalle
Richard Whalen
Honored Contributor

Re: Scripting sftp

If SSH thinks that it is operating in batch mode then it won't attempt password authentication, and you have to use either public key or host based authentication.

SFTP tells SSH that it is operating in batch mode when the command stream is coming from a file (instead of a terminal).
Jack Trachtman
Super Advisor

Re: Scripting sftp

Thanks