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.
Of course I could be oversimplifying things, I haven't tested it.
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
In Section
Seekers of Perl Wisdom