#!/usr/bin/expect spawn ssh root@samsung.router expect "root@router's password: " exp_send "banana\r" expect "# " interact