jxh has asked for the wisdom of the Perl Monks concerning the following question:
Try as I might, I cant figure how to check if my login was sucessful. ( I dont need to do anything further, just check ) In the case of a failure, the ssh->cmd causes an error, but I cant seem to handle this very neatly, I dont think this is the way. $ssh->login doesnt seem to return anything I can use. The 'new' method returns an object, can I do anything with this once Ive called a login ? Stuck.my $ssh = Net::SSH::Perl->new("some_unixhost"); $ssh->login("user", "password"); my ( $out, $err ) = $ssh->cmd("exit");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Connection test : Net::SSH::Perl : $ssh->login - detecting failure
by u235sentinel (Hermit) on Feb 18, 2006 at 02:18 UTC | |
by jxh (Acolyte) on Feb 18, 2006 at 12:03 UTC | |
|
Re: Connection test : Net::SSH::Perl : $ssh->login - detecting failure
by mojotoad (Monsignor) on Feb 19, 2006 at 07:52 UTC | |
by jxh (Acolyte) on Feb 21, 2006 at 19:53 UTC |