Net::C...penSSH(3pm)

πŸ“¦
version 2.400002 Β· 6 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸŽ€ Net::C...penSSH(3pm) πŸŽ€

okay so bestie, you've landed on the Net::C...penSSH(3pm) page β€” that's the manual name right there, straight outta User Contributed Perl Documentation. And ngl, the thing it actually documents is Net::CLI::Interact::Transport::Net_OpenSSH, so let's get into it πŸ’…


✨ NAME ✨

  • Net::CLI::Interact::Transport::Net_OpenSSH β€” a Net::OpenSSH based CLI connection. iconic, we love to see it.

πŸ’– DESCRIPTION πŸ’–

So this module hands you a wrapped-up instance of a Net::OpenSSH SSH client object, ready to be used by Net::CLI::Interact. Like, it's the whole point. 🫢

The way this slaps is that it lets you combine two vibes at once: the Net::CLI::Interact ability to talk to remote servers that Net::OpenSSH's one-command-per-session approach is just not built for (think network equipment running custom administration shells, iykyk), and still flex Net::OpenSSH's ability to run several sessions over one single SSH connection β€” SCP and SFTP services access included. multi-talented fr fr ✨

Heads up bestie: this transport is not supported on Windows, because Net::OpenSSH isn't supported there either. no cap, it's just not happening. πŸ’€

🌸 INTERFACE 🌸

app_and_runtime_options

Based on the connect_options hash you handed to Net::CLI::Interact when you constructed it, this method picks out and formats the command and arguments it needs to run the SSH session over the Net::OpenSSH connection. slay.

Under the hood? It literally just wraps Net::OpenSSH's make_remote_command method. that's it, that's the whole job. πŸ‘‘

Supported attributes:

  • master β€” a reference to the Net::OpenSSH object that wraps the SSH master connection.
  • opts β€” optional hash of extra options to be forwarded to Net::OpenSSH's make_remote_command method.
  • shell_cmd β€” the remote command that starts the shell. Can be a single string, or an array reference if that's more your vibe.

The default is to pass nothing, which on conforming SSH implementations starts the shell configured for the user. very "let them cook" energy.

Examples:

  # interact with default user shell:
  $s->new({
     # ...other parameters to new()...
     connect_options => { master => $ssh },
  });

  # interact with csh:
  $s->new({
     # ...other parameters to new()...
     connect_options => {
         master => $ssh,
         shell_cmd => ['csh', '-i'],
     },
  });
  • reap β€” only used on Unix platforms. This installs a signal handler that attempts to reap the ssh child process. Pass a true value to enable this feature only if you notice zombie processes being left behind after use. πŸ‘€πŸ§Ÿ (yes, actual zombies, we're not being dramatic β€” well, we're a little dramatic, but still.)

🌈 COMPOSITION 🌈

Wanna go deeper on the interface details? See the following:

  • Net::CLI::Interact::Transport::Base

πŸ‘‘ AUTHORS πŸ‘‘

  • Oliver Gorwits <oliver@cpan.org>
  • Salvador FandiΓ±o <sfandino@yahoo.com>

This software is copyright (c) 2014 by Oliver Gorwits. This software is copyright (c) 2014 by Salvador FandiΓ±o.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt. πŸ’…


and that's the whole page, bestie!! πŸ¦‹βœ¨ this was perl v5.36.0, dated 2023-10-28, and it's the Net::C...penSSH(3pm) manual page β€” go forth and SSH responsibly, mwah πŸ’–πŸŽ€

πŸ“¦ where this page comes from