Automate interactive CLI applications with scripted input/output
Program that can automate interactive applications
expectautoexpect$ expect -c 'spawn ssh user@host; expect "password:"; send "mypass\r"; interact'$ cat > script.exp << 'EOF'
spawn ftp ftp.example.com
expect "Name"
send "user\r"
expect "Password"
send "pass\r"
expect "ftp>"
send "quit\r"
EOF
expect script.exp$ autoexpect ssh user@host