Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Change user to root using ssh::expect

by skx (Parson)
on Sep 01, 2009 at 19:59 UTC ( #792725=note: print w/replies, xml ) Need Help??


in reply to Change user to root using ssh::expect

I'd double-check the password just to be sure, but if you are sure then it might be something such as a missing "\n" (or newline)

You could test for that by changing your code to read:

my $pass = 'passw0rd'; $result = $ssh->send($pass . "\n" );
Steve
--

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://792725]
help
Chatterbox?
[james28909]: i forgot how to link my scratch pad
[Lady_Aleena]: [pad://]
[james28909]: my scratchpad
[james28909]: and like i say, is just an example, not working code, but hopefully you understand what i mean. :)
[james28909]: and like i say, it would be alot of work to get around renaming 3 subs haha
[Lady_Aleena]: Well, you would have to add the file munging and a lot more.
[james28909]: yeah but it would rename those subs xD

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2017-05-24 05:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?