1Net::SSH::Perl::Kex(3)User Contributed Perl DocumentationNet::SSH::Perl::Kex(3)
2
3
4
6 Net::SSH::Perl::Kex - SSH2 Key Exchange
7
9 use Net::SSH::Perl::Kex;
10 my $kex = Net::SSH::Perl::Kex->new($ssh);
11 $kex->exchange;
12
14 Net::SSH::Perl::Kex implements base functionality for SSH2 key
15 exchange. The basic idea is this: Kex itself initializes the client
16 algorithm proposal, sends it to the server, then waits for the server's
17 proposal. From these proposals Kex chooses the algorithms that will be
18 used in the communications between client and server (eg. encryption
19 algorithm, MAC algorithm, etc.). Different algorithms can be used in
20 each direction; for example, client to server communications could be
21 encrypted using 3DES, and server to client could be encrypted using
22 RC4.
23
24 The algorithm negotiation phase, as described above, includes
25 negotiation for the key-exchange algorithm to be used. After algorithm
26 negotiation, the Kex object is reblessed into the key exchange class
27 (eg. 'Net::SSH::Perl::Kex::DH1'), and then the subclass's exchange
28 method is called to perform the key exchange.
29
30 Once control returns to Kex::exchange, the client waits for the
31 SSH_MSG_NEWKEYS message; once received, the client turns on its
32 incoming encryption/MAC/compression algorithms, then sends an
33 SSH_MSG_NEWKEYS message to the server. Finally, it turns on its
34 outgoing encryption/MAC/compression algorithms.
35
37 Please see the Net::SSH::Perl manpage for author, copyright, and
38 license information.
39
40 New key exchange mechanisms added by: Lance Kinley
41 E<lkinley@loyaltymethods.com>
42
44 Hey! The above document had some coding errors, which are explained
45 below:
46
47 Around line 334:
48 Unknown E content in E<lkinley@loyaltymethods.com>
49
50
51
52perl v5.38.0 2023-08-08 Net::SSH::Perl::Kex(3)