Net::SS...onstants(3)

πŸ“¦
version 2.144 Β· 4 versions
, in fedora 44

✨ NAME ✨

okay so bestie, welcome to Net::SSH::Perl::Constants β€” it's the constants page, and it's literally just a big ol' pile of exportable constants. that's the whole vibe. it's part of the User Contributed Perl Documentation collection, and the page itself is filed as Net::SS...onstants(3) (yes the name is truncated, the man page system is doing its little thing, don't worry about it πŸŽ€).


🌸 SYNOPSIS 🌸

use Net::SSH::Perl::Constants qw( constants );

πŸ’… DESCRIPTION πŸ’…

Net::SSH::Perl::Constants is your little treasure box 🎁 of common and useful constants for talking to an sshd server and, like, other ssh-related situations.

⚠️ heads up: none of these constants get exported by default. you have to explicitly ask for them, no auto-grab, no sneaky freebies. some of them are bundled into groups you can snatch all at once, or you can just take the individual constants one by one, cherry-picking style πŸ“.

so if you wanna import a whole group, your use statement should look something like this:

use Net::SSH::Perl::Constants qw( :group );

and here are the groups πŸ‘‘

  • msg β€” all of the MSG constants. in the SSH packet layer protocol, every packet is identified by its type; like, you've got a packet type for starting RSA authentication, a totally different type for sending a command, etc. the MSG constants are what you use when creating a new packet, and then:
my $packet = $ssh->packet_start( I<msg_constant> );

see the Net::SSH::Perl::Packet and Net::SSH::Perl docs for the details, bestie.

ngl, Net::SSH::Perl doesn't support every single feature of the ssh client, so it doesn't need all of its MSG constants. for the full list of such constants, plus an explanation of each one, go check the SSH RFC. πŸ“œ

here's the list of MSG constants supported by Net::SSH::Perl, in all its glory: SSH_MSG_NONE, SSH_MSG_DISCONNECT, SSH_SMSG_PUBLIC_KEY, SSH_CMSG_SESSION_KEY, SSH_CMSG_USER, SSH_CMSG_AUTH_RHOSTS, SSH_CMSG_AUTH_RSA, SSH_SMSG_AUTH_RSA_CHALLENGE, SSH_CMSG_AUTH_RSA_RESPONSE, SSH_CMSG_AUTH_PASSWORD, SSH_CMSG_EXEC_SHELL, SSH_CMSG_EXEC_CMD, SSH_SMSG_SUCCESS, SSH_SMSG_FAILURE, SSH_CMSG_STDIN_DATA, SSH_SMSG_STDOUT_DATA, SSH_SMSG_STDERR_DATA, SSH_CMSG_EOF, SSH_SMSG_EXITSTATUS, SSH_MSG_IGNORE, SSH_CMSG_EXIT_CONFIRMATION, SSH_CMSG_AUTH_RHOSTS_RSA, SSH_MSG_DEBUG, SSH_CMSG_REQUEST_COMPRESSION.

  • hosts β€” the HOST constants: HOST_OK, HOST_NEW, and HOST_CHANGED. these get returned from the _check_host_in_hostfile routine over in Net::SSH::Perl::Util. hit up those docs for that routine if you want the full explanation of what each of these constants actually means. πŸ”
  • agent β€” the AGENT constants, used when you're talking to an authentication agent: SSH_AGENTC_REQUEST_RSA_IDENTITIES, SSH_AGENT_RSA_IDENTITIES_ANSWER, SSH_AGENTC_RSA_CHALLENGE, SSH_AGENT_RSA_RESPONSE, SSH_AGENT_FAILURE, SSH_AGENT_SUCCESS, SSH2_AGENTC_REQUEST_IDENTITIES, SSH2_AGENT_IDENTITIES_ANSWER, SSH2_AGENTC_SIGN_REQUEST, SSH2_AGENT_SIGN_RESPONSE. πŸ•΅οΈβ™€οΈ

🌈 other exportable constants 🌈

these ones don't belong to any group, they're the solo main characters:

  • PROTOCOL_MAJOR
  • PROTOCOL_MINOR

these two constants describe the version of the protocol supported by this SSH client (ie., Net::SSH::Perl). they're used when identifying the client to the server and vice versa. it's giving handshake energy 🀝.

  • PRIVATE_KEY_ID_STRING β€” a special ID string written to private key files; if the ID string in the file doesn't match this one, we stop reading the private key file. full stop, no cap. πŸ›‘
  • MAX_PACKET_SIZE β€” the maximum size of a packet in the packet layer. big packet energy, but like, capped. πŸ“¦

πŸ‘‘ AUTHOR & COPYRIGHTS πŸ‘‘

please see the Net::SSH::Perl manpage for author, copyright, and license information. they said it, not me πŸ’œ.


okay that's the whole page, you ate that πŸ’…βœ¨ this little doc was served up by perl v5.42.0, dated 2026-01-17, and filed under Net::SS...onstants(3) β€” go forth and import responsibly, bestie πŸ¦‹πŸŒΈπŸ«Ά

πŸ“¦ where this page comes from