I've tried reading up on this, but I can't figure out why it's happening.When Expect sends the password it appears as echoed cleartext in the terminal and afterwards Sorry, try again. appears.The script goes as follows#!/usr/bin/expect -fspawn bashsend -- sudo (many tasks)\rexpect -exact \[sudo\] password for elade: send -- password\rexpect -exact user@x.x.x.x's password: send -- password\rexpect @send -- echo Done; sleep 1; exit\rexpect eofThe terminal output after sending first password is:[sudo] password for elade:passwordSorry, try again.I'm using Arch linux and the terminal emulator Konsole.
Expect script not sending password as planned
bash;arch linux;expect;konsole