Net::O...::Perl(3pm)

πŸ“¦
version 0.09 Β· 2 versions
  • 0.09 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.09 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

🌸 Net::O...::Perl(3pm) β€” the bestie edition 🌸

okay so this is a page from the User Contributed Perl Documentation collection, and it's about Net::OpenSSH::Compat::Perl. yes the title got truncated to Net::O...::Perl because terminals are dramatic like that πŸ’… anyway, come sit with me, we're learning this together.


✨ NAME ✨

Net::OpenSSH::Compat::Perl β€” it's a Net::OpenSSH adapter that gives you Net::SSH::Perl API compatibility. so like, a translator bestie between two worlds 🫢


✨ SYNOPSIS ✨

  use Net::OpenSSH::Compat::Perl qw(:supplant);

  use Net::SSH::Perl;

  my $ssh = Net::SSH::Perl->new('host');
  $ssh->login($user, $passwd);

  my ($out, $err, $rc) = $ssh->cmd($cmd);

that's it, that's the whole vibe check πŸ’–


✨ DESCRIPTION ✨

This module implements a subset of the Net::SSH::Perl API on top of Net::OpenSSH. like, not the whole thing, just a subset, ok? don't come for me.

After the module is loaded as...

  use Net::OpenSSH::Compat::Perl qw(:supplant);

...it supplants the Net::SSH::Perl module as if it were installed on the machine β€” using Net::OpenSSH under the hood to handle SSH operations. it's giving undercover agent energy fr fr πŸ•΅οΈβ™€οΈ

πŸŽ€ Setting defaults

The hash %Net::OpenSSH::Compat::Perl::DEFAULTS can be used to set default values for Net::OpenSSH and other modules called under the hood, and otherwise not accessible through the Net::SSH::Perl API. it's the backstage pass, iykyk πŸ‘‘

The entries currently supported are:

  • connection => [ %opts ] β€” extra options passed to the Net::OpenSSH::new constructor.

Example:

  $Net::OpenSSH::Compat::SSH::Perl::DEFAULTS{connection} =
    [ ssh_path => "/opt/SSH/bin/ssh" ];

(yes, copy that example exactly as it's written, bestie β€” character for character, no cap.)


😭 BUGS AND SUPPORT 😭

This is a work in progress. we're in our building era.

register_handler method is not supported. nope, nope, not a thing.

Net::SSH::Perl submodules (i.e. Net::SSH::Perl::Channel) are not emulated. so if you go looking for them, they're not there 🫠

Anyway, if your Net::SSH::Perl script fails, fill a bug report at the CPAN RT bugtracker (<https://rt.cpan.org/Ticket/Create.html?Queue=Net-OpenSSH-Compat>) or just send me an e-mail with the details. we love a paper trail πŸ’Œ

Include at least:

  1. The full source of the script
  2. A description of what happens in your machine
  3. What you thing it should be happening
  4. What happens when you use the real Net::SSH::Perl
  5. The version and name of your operating system
  6. The version of the OpenSSH ssh client installed on your machine (ssh -V)
  7. The Perl version (perl -V)
  8. The versions of the Perl packages Net::OpenSSH, IO::Pty and this Net::OpenSSH::Compat.
ngl number 3 says "what you thing it should be happening" β€” that's literally what the page says, so I'm keeping it, typos and all, because the facts do not change πŸ’…

🌈 Git repository

The source code repository is at <https://github.com/salva/p5-Net-OpenSSH-Compat>. go star it, it's the least we can do ⭐

πŸ’– My wishlist

If you like this module and you're feeling generous, take a look at my Amazon Wish List: <http://amzn.com/w/1WU1P6IR5QZ42>. bestie behavior honestly 🎁

Also consider contributing to the OpenSSH project this module builds upon: <http://www.openssh.org/donations.html>. mutual aid, we love to see it 🌸


Copyright (C) 2011, 2014-2016 by Salvador FandiΓ±o (sfandino@yahoo.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.


real talk: the license stuff matters, don't skip it, it's the whole reason this module can exist out here living its best life ✨

and that's the page, bestie πŸ¦‹ this one was rendered by perl v5.34.0 and dated 2022-06-30 β€” so if you're reading this way later, hey, hi, you're in the future and I'm proud of you πŸ’œ periodt.

πŸ“¦ where this page comes from