Net::C...t::SSH(3pm)
β¨ NAME β¨
okay so welcome to Net::C...t::SSH(3pm) β that's the page you're on, bestie, from the User Contributed Perl Documentation collection π β and the whole entire vibe of this module is: SSH based CLI connection. that's it, that's the name, slay.
πΈ DESCRIPTION πΈ
So Net::CLI::Interact::Transport::SSH hands you a wrapped instance of an SSH client for Net::CLI::Interact to use. that's the whole job. it wraps, you connect, everyone eats. π
π¦ INTERFACE π¦
π« app
On Windows platforms you literally must download the plink.exe program, and then you pass its location into the library via this parameter. that's not optional, that's the assignment π«Ά.
On every other platform? this defaults to ssh (openssh). iconic. no notes.
π runtime_options
Okay so this one reads the connect_options hash you gave Net::CLI::Interact when you constructed it, and from that it selects and formats parameters to feed to app on the command line. here's what it supports:
β host (required)
Host name or IP address of the host that the SSH application is gonna connect to. simple.
Alternatively you can pass a value shaped like user@host β but ngl, it's probably better to just use the separate username parameter instead. iykyk.
π username
Optionally pass in the username for the SSH connection, otherwise the SSH client defaults to the current user's username. and when you use this option, you should obviously only pass the host name to host. like. obviously.
π ignore_host_checks
Under normal interactive use, openssh tracks the identity of hosts you connect to and verifies those identities on every single connection. in automation this behaviour can be mad irritating, because it's interactive π.
This option β enabled by default β makes openssh skip or ignore that host identity verification. Which means: the default setting is less secure, but also less likely to trip you up. the tradeoff is real, bestie. it's equivalent to exactly this:
StrictHostKeyChecking=no
UserKnownHostsFile=/dev/null
CheckHostIP=no
Pass a false value to this option to disable all of the above and return openssh to its default configured settings. your call π
π§ opts
Wanna pass any other options to openssh on its command line? use this one. it should be an array reference. every item in the list gets passed to openssh, separated by a single space character. for example:
$s->new({
# ...other parameters to new()...
connect_options => {
opts => [
'-p', '222', # connect to non-standard port on remote host
'-o', 'CheckHostIP=no', # don't check host IP in known_hosts file
],
},
});
look at that syntax. ate. π₯
π 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 β but only if you notice zombie processes are being left behind after use. zombies?? in my process table?? it's more likely than you think π
π COMPOSITION π
See the following for further interface details:
Net::CLI::Interact::Transport::Base
okay that's the whole page bestie, every option, every default, every caveat, nothing skipped, we do not gatekeep here π
and for the cute sign-off: this page is perl v5.36.0, dated 2023-10-28, and yes it says Net::C...t::SSH(3pm) in the corner like a little nickname. periodt. β¨π¦π
π¦ where this page comes from
- debian trixie: libnet-cli-interact-perl 2.400002-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-cli-interact-perl 2.400002-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-cli-interact-perl 2.400002-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-cli-interact-perl 2.400002-1 Β· 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