For SFTP connection - How to give password in UNIX Script (ksh)

view story

http://www.unix.com – Hi, I am not able to give the password in Unix script for SFTP connection. When I am trying to manully SFTP command for accessing the server , it asking for pwd and I could provide the pwd but I am not getting how to provide the pwd inside the Unix script. Code: sftp -v [email protected] This command is working but how to pass password for connecting the server via Unix bash script. Below is the script: Code: #!/usr/bin/ksh INGXDIR=/dev # FTP to Vital echo "Connecting to Vital...."  sftp -v [email protected] << EOF_FTP cd $INGXDIR binary mput NewWdir.zip bye (HowTos)