sftp/scp/ssh script with password as authentication

Hello,

Do you guys know set of commands that can incorporate to sftp/scp/ssh to add password in a script to automate file transfer.

Our client is not using ssh keys authentication so we are force to create a script to pass the password into the script to transfer files via sftp/scp/ssh.

We are looking other ways to code the script without first using HP Expect tool and perl scripting which also requires installation of certain libraries.

Can somebody help me how to tweak sftp/scp/ssh commands to received password via script so we can automate this one? Thanks a lot.

You can do a hostbased authentication.

This also means changing something on the target server. Our client don't want to change anything on there side right now. They are insisting the change must be on our side alone. They supply only the username/password and we'll connect via secure file transfer.

I'm looking on script changes. Is there a way to incorporate password authentication on a script?

James,
I haven't found any way within the SFTP process to call something to handle the password response. What I've done is to create an 'expect' script which accepts userid, control word, ip address, destination folder, and a filename to be transfered. The 'expect' software is required on the client side not the server side so you wouldn't have to modify the client's system. From their point of view, you are doing password responding. The 'expect' script is fairly simply as it sets the variables inside the 'expect' script, spawns an sftp process and then waits for replies and does sends when it gets the expected reply.

I would like to find a way also to do replying without 'expect' but a the moment, I don't know of a way.

Just thoughts...
Woulndt a .netrc file do the job?

-----Post Update-----

man netrc(4)