http://qs321.pair.com?node_id=406313


in reply to using Net::SSH::Perl and Expect

You're right,
Net::SSH::Perl is not to be used with Expect, but you can use Net::SSH though. Net::SSH::Perl has built-in support for the authentication protocols, so there's no longer any hassle of communicating with any external processes.

from the docs:

my $ssh = Net::SSH::Perl->new("host1"); $ssh->login("user1", "pass1"); $ssh->cmd("foo"); #I'd say: try su?

Of course I could be oversimplifying things, I haven't tested it.

Teabag

-- Siggy Played Guitar
Sure there's more than one way, but one just needs one anyway - Teabag