Net::O...at::SSH(3pm)
π Net::OpenSSH::Compat::SSH β bestie edition β¨
okay so this is Net::OpenSSH::Compat::SSH, and it lives in the User Contributed Perl Documentation section of the manual (you know, the (3pm) crew π
). if you're a Net::SSH girlie who wants Net::OpenSSH energy under the hood, this is literally your page. π«Ά
πΈ NAME πΈ
Net::OpenSSH::Compat::SSH β a Net::OpenSSH adapter that gives you Net::SSH API compatibility. it's giving "glow up, but make it drop-in." β¨
π SYNOPSIS π
use Net::OpenSSH::ConnectionCache; # for speed bost
use Net::OpenSSH::Compat qw(Net::SSH);
use Net::SSH qw(ssh ssh_cmd sshopen3);
my $out = ssh_cmd('username@host', $command);
sshopen2('user@hostname', $reader, $writer, $command);
sshopen3('user@hostname', $writer, $reader, $error, $command);
look at that. three whole helpers, no cap. ssh_cmd grabs you the output, sshopen2 hands you a reader and a writer, and sshopen3 pulls up with a reader, a writer and an error handle. main character trio fr fr. π
π¦ DESCRIPTION π¦
so here's the tea: this module implements the Net::SSH API on top of Net::OpenSSH. it's a compatibility layer, aka a little wardrobe change so your old code still slays. π
once you load it like this:
use Net::OpenSSH::Compat 'Net::SSH';
or, if you're feeling command-line chaotic:
$ perl -MNet::OpenSSH::Compat=Net::SSH script.pl
then boom β it will supplant the Net::SSH module as if it was installed on the machine, and use Net::OpenSSH under the hood to handle all your SSH operations. sneaky? no. iconic? yes. πβ¨
most programs using Net::SSH should continue to work without any change. like, zero edits, zero tears, just vibes. ππ
and you can run it together with Net::OpenSSH::ConnectionCache β usually for a big speed boost. it's the little collab that eats. π₯ (hot tip: that's the same thing the synopsis is on about up there π)
ngl, if you're swapping Net::SSH out for this, definitely pair it with Net::OpenSSH::ConnectionCache. the manpage says big speed boost and honestly? believe it. π§
and that's the whole page, bestie β short, sweet, and it ate. π
sign-off time: this beauty is documented as perl v5.34.0, dated 2022-06-30, and yes, it's still filed under Net::O...at::SSH(3pm) because the header column only has so much room and the terminal said "abbreviate or perish." πβ¨ go write some SSH, you gorgeous nerd. ππβ
π¦ where this page comes from
- debian bookworm: libnet-openssh-compat-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnet-openssh-compat-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-openssh-compat-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-openssh-compat-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-openssh-compat-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms