register_services (Net::SSH::Transport::Kex)

    # File lib/net/ssh/transport/kex/services.rb, line 25
            def register_services( container )
              container.namespace_define :kex do |b|

                # The :dh service is a standard Diffie-Hellman key exchange
                # algorithm using Group-1 and SHA-1.
                b.dh :model => :singleton_deferred do
                  require 'net/ssh/transport/kex/dh'
                  dh = DiffieHellmanGroup1SHA1.new( b.bns, b.digesters )
                  dh.keys = b.keys
                  dh.buffers = b.buffers
                  dh.host_key_verifier = b.host_key_verifier
                  dh
                end

                # The :dh_gex service is a standard Diffie-Hellman key exchange
                # algorithm using SHA-1 and a negotiated group.
                b.dh_gex :model => :singleton_deferred do
                  require 'net/ssh/transport/kex/dh-gex'
                  dh = DiffieHellmanGroupExchangeSHA1.new( b.bns, b.digesters )
                  dh.keys = b.keys
                  dh.buffers = b.buffers
                  dh.host_key_verifier = b.host_key_verifier
                  dh
                end

                # Add these services to the hash of available kex algorithms.
                b.kex_names.update(
                  "diffie-hellman-group-exchange-sha1" => b.dh_gex,
                  "diffie-hellman-group1-sha1" => b.dh
                )
              end
            end