#!/bin/bash expect <(cat <<-delimiter set timeout 3 spawn ssh -l root 192.168.8.12 expect { "password" { send "exuberant\n" } } interact delimiter )