Subject: | Net::OpenSSH with Wrapper remote Shell |
Hello,
I'm not so sure about if it is a bug or not, sorry about it. I don't have much knowledge about SSH, terminals, etc..
However, I think there's something weird happening when I use Net::OpenSSH to remotely connect to a server (kind of a appliance) that starts a Wrapper shell instead of a regular shell.
Net::OpenSSH doesn't send any command I ask to send : it is like the remote Wrapper shell wasn't controller by Net::OpenSSH.
Instead, my terminal have access to the remote Wrapper shell !
I have the feeling I could use Expect to script around, but I'm not sure and I'd prefer to not use Expect if possible.
I've added a typescript script, that you can replay with
$ scriptreplay -t timinfile typescript
Does that ring a bell to you ?
Best regards,
Joris
Subject: | example.pl |
#!/usr/bin/env perl
use Data::Dumper;
use Modern::Perl '2014';
use Net::OpenSSH;
use Net::SFTP::Foreign;
use IO::Pty;
my @hosts = qw/
2102310yjv10f1000181.company.lom
/;
my %ssh;
for my $host (@hosts) {
$ssh{$host} = Net::OpenSSH->new($host,
user => 'root',
password => 'secret',
async => 1,
);
}
for my $host (@hosts) {
my $status = $ssh{$host}->system("top");
say $status;
}
Subject: | timinfile |
Message body not shown because it is not plain text.
Subject: | typescript |
Message body not shown because it is not plain text.