Create expect script automaticaly autoexpect -f myExpectScript ssh user@server Script to run a command or script on multiple servers as root run_as_root.sh