fix a potential bug for SSHInteract
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12368 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
83bcc20597
commit
92d59e063a
@ -53,7 +53,7 @@ sub new {
|
||||
if ($nokeycheck) { delete $args{"-nokeycheck"}; }
|
||||
my $self = Net::Telnet->new(%args);
|
||||
_startssh($self,$pty,$username,$host,"-nokeycheck"=>$nokeycheck);
|
||||
my ($prematch,$match) = $self->waitfor([Match => $args{prompt},'/password:/i',]);
|
||||
my ($prematch,$match) = $self->waitfor([Match => $args{prompt},'/password:/i',]) or die "Login Failed: ",$self->lastline;
|
||||
if ($match =~ /password:/i) {
|
||||
#$self->waitfor("-match" => '/password:/i', -errmode => "return") or die "Unable to reach host ",$self->lastline;
|
||||
$self->print($password);
|
||||
|
Loading…
Reference in New Issue
Block a user