#!/bin/bash
expect -c "
spawn ssh user@10.0.0.1
expect \"password:\"
send \"12345\r\"
interact
"
`interact` hands you back control to do whatever you want, but you don't actually need to do that. You can have `expect` run every command, fill out every field.The tool you need when you're in environments you don't deserve.