#!/usr/bin/perl -w use strict; use Expect; # version 1.11! my $ssh = Expect->new('ssh tilrman@localhost'); $ssh->debug(1); $ssh->expect(60, q{tilrman@localhost's password:}); $ssh->send("********\n"); $ssh->expect(60, '$'); $ssh->send("exit\n"); $ssh->close(); #### my $ssh = Expect->new('ssh tilrman@localhost;');