Net::SS...erl::Kex(3)

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

πŸ’– Net::SS...erl::Kex(3) πŸ’–

okay bestie, welcome to the manual page for Net::SS...erl::Kex β€” it's part of the User Contributed Perl Documentation crew and it's literally all about SSH2 Key Exchange. pull up a chair, grab a boba, we're doing cryptography gossip 🧚✨


✨ NAME ✨

Net::SSH::Perl::Kex β€” SSH2 Key Exchange. that's it, that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

the way you summon it is so simple, no cap:

use Net::SSH::Perl::Kex;
my $kex = Net::SSH::Perl::Kex->new($ssh);
$kex->exchange;

three lines. iconic. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so Net::SSH::Perl::Kex implements the base functionality for SSH2 key exchange. and the basic idea, fr fr, is this:

  1. Kex itself initializes the client algorithm proposal, sends it over to the server, then waits for the server's proposal.
  2. From those proposals, Kex chooses the algorithms that'll be used in the communications between client and server β€” like the encryption algorithm, the MAC algorithm, etc.
  3. and get this: different algorithms can be used in each direction. for example, client-to-server communications could be encrypted using 3DES, and server-to-client could be encrypted using RC4. two directions, two fits, we love range πŸ’…

the algorithm negotiation phase, as described above, also includes negotiation for the key-exchange algorithm to be used. so once algorithm negotiation is done, the Kex object gets reblessed into the key exchange class β€” like 'Net::SSH::Perl::Kex::DH1' β€” and then the subclass's exchange method is called to actually perform the key exchange. glow-up complete, slay ✨


then, once control returns to Kex::exchange, the client waits for the SSH_MSG_NEWKEYS message. once it's received:

  • the client turns on its incoming encryption/MAC/compression algorithms πŸŽ€
  • then sends an SSH_MSG_NEWKEYS message to the server πŸ’Œ
  • and finally, it turns on its outgoing encryption/MAC/compression algorithms 🌈

in that order. periodt.


🫢 AUTHOR & COPYRIGHTS 🫢

please see the Net::SSH::Perl manpage for author, copyright, and license information. i'm just the messenger bestie πŸ’œ

New key exchange mechanisms added by: Lance Kinley E<lkinley@loyaltymethods.com>


😭 POD ERRORS 😭

hey! the above document had some coding errors, which are explained below. not me snitching on the pod, but the parser said so πŸ™ˆ

Around line 334:

Unknown E content in E<lkinley@loyaltymethods.com>
it's giving "the email tag did not cooperate". we still love it. πŸ’€

aaaand that's the whole page, bestie πŸŽ€ this was perl v5.42.0, dated 2026-01-17, and it came to you straight from Net::SS...erl::Kex(3). go forth and exchange those keys responsibly. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from