# File lib/net/ssh/service/services.rb, line 24
      def register_services( container )

        # Define the hash that will be used to record the registered services.
        # If the hash already exists, don't redefine it.
        unless container.knows_key?( :services )
          container.define.services { Hash.new }
        end

        # Register the services in their own namespace.
        container.namespace_define :service do |ns|
          ns.require "net/ssh/service/forward/services", "#{self}::Forward"
          ns.require "net/ssh/service/process/services", "#{self}::Process"
          ns.require "net/ssh/service/shell/services", "#{self}::Shell"
        end

        # Add the services to the services hash.
        container.services[ :forward ] = container.service.forward.driver
        container.services[ :process ] = container.service.process.driver
        container.services[ :shell ] = container.service.shell.driver

        # Register the external services and add them to the collection of
        # known services.
        EXTERNAL_SERVICES.each do |name, block|
          container.service.register( name,
            :model => :singleton_deferred,
            &block )
          container.services[ name ] = container.service[ name ]
        end

      end