Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: using Net::SSH::Perl and Expect

by teabag (Pilgrim)
on Nov 09, 2004 at 11:55 UTC ( #406313=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://406313]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2020-11-24 10:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?