Hello folks
i want to know hoaw can i automate sftp command.
When i am execute the script it sftp connect to host and ask for the password but i want password also to be supplied in batfile .It should not ask password on console .
ssh keys provide passwordless access. ssh is NOT designed to allow -b to have a password in the batch file. As you leanred. You can probably find a workaround by writing a daemon with controlling terminal, but why do that? ssh has keyts for the purpose.
IF this does not suit you use ftp, It does allows passwords in a script.
The reason for this - hardcoded passwords are a major security problem.