fix(paloalto/ssh): session remains (#3288)

This commit is contained in:
qgarnier 2021-12-02 10:21:50 +01:00 committed by GitHub
parent 140fa3ec50
commit 76c2b200ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -90,7 +90,7 @@ sub execute_command {
$self->{ssh_commands} =
"set cli op-command-xml-output on\n" .
$options{command} . "\n";
$options{command} . "\nexit\n";
my $stdout;
if (defined($self->{option_results}->{hostname}) && $self->{option_results}->{hostname} ne '') {
@ -100,8 +100,7 @@ sub execute_command {
command => defined($self->{option_results}->{command}) && $self->{option_results}->{command} ne '' ? $self->{option_results}->{command} : $self->{ssh_commands},
command_path => $self->{option_results}->{command_path},
command_options => defined($self->{option_results}->{command_options}) && $self->{option_results}->{command_options} ne '' ? $self->{option_results}->{command_options} : undef,
timeout => $self->{option_results}->{timeout},
cmd_exit => !defined($self->{option_results}->{command}) || $self->{option_results}->{command} eq '' ? "exit\n" : undef
timeout => $self->{option_results}->{timeout}
);
} else {
if (!defined($self->{option_results}->{command}) || $self->{option_results}->{command} eq '') {