I have set of series SFTP commands which needs to run inside expect.
But when i run the below script due to some reasons am not getting any output. Please correct me if am wrong any where inside the script.
expect << EOF spawn sftp -oPort=23 -oBatchMode=no -b cmds.txt email@example.com sleep 3 expect "firstname.lastname@example.org's password:" send "hello123\r" EOF
But when i run below command in CLI interface it works super good:
# spawn sftp -oPort=23 -oBatchMode=no -b cmds.txt email@example.com
For Security Reasons, I cant use SCP, SSHPASS, KeyChain Etc.,