in reply to fork + Expect.pm + ssh == success!
Is there any specific reason for not using Net::SSH::Perl here?
use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd($cmd);
Note you're never calling mysub(), you're only referencing it in void context. Use mysub; instead of \&mysub;.
You seem to want to replace threads with forks. Why not use forks then? It's a drop-in replacement for threads. (I expect Net::SSH::Perl to work with threads. Haven't tried, though.)
Note that if *you* can decrypt a password, someone else can too! Consider using keys instead of passwords.
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: fork + Expect.pm + ssh == success!
by Cmdr_Tofu (Scribe) on Dec 29, 2002 at 00:13 UTC | |
by Juerd (Abbot) on Dec 29, 2002 at 00:27 UTC |