I\'m trying to do scp as well as ssh through expect. Below script works if I invoke it directly from terminal like /usr/bin/expect myexpect.sh but when I ran it usi
I know nothing about salt-stack but I suspect it's not running your Expect script from a pty. So replace interact with expect eof (or expect -timeout 12345 eof if necessary). interact works only when stdin is on a tty/pty.