Net::SSH::Expect
- From: Nene <rodbass63@xxxxxxxxx>
- Date: Thu, 17 May 2012 15:39:56 -0700 (PDT)
My variable $main::newvar , which holds a very long command will not
print to screen after '$ssh->run_ssh() or die "SSH process couldn't
start: $!";'
#!!/usr/bin/perl -w
use strict;
my $ssh = Net::SSH::Expect->new (
host => "xxxxxxx",
password=> 'xxxxxx',
user => 'xxxxxx',
raw_pty => 1
);
print "$main::newvar\n", br; #### It prints here...
# now start the ssh process
$ssh->run_ssh() or die "SSH process couldn't start: $!";
$ssh->waitfor('\[xxxxxxx\@a_box:Standby\].* \#', 3) or die "prompt not
found after 3 second";
print "$main::newvar\n", br; It DOES NOT print here.....
Any help will be greatly appreciated.
.
- Follow-Ups:
- Re: Net::SSH::Expect
- From: Ben Morrow
- Re: Net::SSH::Expect
- Prev by Date: Re: Encrypted connection
- Next by Date: Re: Net::SSH::Expect
- Previous by thread: Encrypted connection
- Next by thread: Re: Net::SSH::Expect
- Index(es):