#!/usr/bin/perl5.8.4 use Expect; my $timeout = 5; $session = new Expect; #$session->debug(3); $session->spawn("ssh 666.666.666.666 -l root\r"); $session->expect($timeout, "password:"); $session->send("wibblewobble\r"); $session->expect($timeout, "F101"); $session->send("\r"); $session->expect($timeout, "F101"); $session->send("exit\r"); $session->expect($timeout, "F101");