Why does sftp in batchmode not prompt for a password in RHEL5 or later version?

Solution Verified - Updated -

Issue

  • If run the following commands, it shows Permission Denied error:
$ sftp -b ftpput.cmd <user@site>  

$ cat ftpput.cmd  
lls -l <filename>  
ls -l  
put <sourcefile> <targetfile>  
ls -l  
bye
  • I want to get password in batch mode as it did work in RHEL4 rather than showing below error
Permission denied (publickey,password,keyboard-interactive).
Couldn't read packet: Connection reset by peer

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.