#! /usr/bin/expect # Fri, 12 Sep 2008 12:58:10 -0400 # Edit the following line - $USER@$SERVER spawn ssh your-useid@your-server-name # First time connection will print out some text for # which one needs to type 'yes' to continue # Comment these two lines after the first attempt expect "*Are you sure you want to continue connecting*" send "yes\r" # Put the password here expect "*assword*" send "YOUR-PASSWORD\r" # Start interacting interact