SFTP- Non-interactive user authentication

Hi All,

sftp -b script.txt <hostname>

user-authentication through non-interactive way is desired. But, its failing to do so.

Could anyone kindly advise.

Thanks for any/all help at the earliest.

Regards,
Dheeraj.

What is failing? You need to be more specific. What error messages? Has the key exchange been carried out? Also, your command is not enough for key based authentication; you have not specified the user to connect as.
Try this:

sftp -b batch_filename user@host