Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by teabag (Pilgrim)
on Nov 09, 2004 at 11:55 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://406313]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-25 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found