def ssh_info
      # First, ask the provider for their information. If the provider
      # returns nil, then the machine is simply not ready for SSH, and
      # we return nil as well.
      info = @provider.ssh_info
      return nil if info.nil?

      # Delete out the nil entries.
      info.dup.each do |key, value|
        info.delete(key) if value.nil?
      end

      # We set the defaults
      info[:host] ||= @config.ssh.default.host
      info[:port] ||= @config.ssh.default.port
      info[:private_key_path] ||= @config.ssh.default.private_key_path
      info[:keys_only] ||= @config.ssh.default.keys_only
      info[:verify_host_key] ||= @config.ssh.default.verify_host_key
      info[:username] ||= @config.ssh.default.username
      info[:remote_user] ||= @config.ssh.default.remote_user
      info[:compression] ||= @config.ssh.default.compression
      info[:dsa_authentication] ||= @config.ssh.default.dsa_authentication
      info[:extra_args] ||= @config.ssh.default.extra_args
      info[:config] ||= @config.ssh.default.config

      # We set overrides if they are set. These take precedence over
      # provider-returned data.
      info[:host] = @config.ssh.host if @config.ssh.host
      info[:port] = @config.ssh.port if @config.ssh.port
      info[:keys_only] = @config.ssh.keys_only
      info[:verify_host_key] = @config.ssh.verify_host_key
      info[:compression] = @config.ssh.compression
      info[:dsa_authentication] = @config.ssh.dsa_authentication
      info[:username] = @config.ssh.username if @config.ssh.username
      info[:password] = @config.ssh.password if @config.ssh.password
      info[:remote_user] = @config.ssh.remote_user if @config.ssh.remote_user
      info[:extra_args] = @config.ssh.extra_args if @config.ssh.extra_args
      info[:config] = @config.ssh.config if @config.ssh.config

      # We also set some fields that are purely controlled by Vagrant
      info[:forward_agent] = @config.ssh.forward_agent
      info[:forward_x11]   = @config.ssh.forward_x11
      info[:forward_env]   = @config.ssh.forward_env

      info[:ssh_command] = @config.ssh.ssh_command if @config.ssh.ssh_command

      # Add in provided proxy command config
      info[:proxy_command] = @config.ssh.proxy_command if @config.ssh.proxy_command

      # Set the private key path. If a specific private key is given in
      # the Vagrantfile we set that. Otherwise, we use the default (insecure)
      # private key, but only if the provider didn't give us one.
      if !info[:private_key_path] && !info[:password]
        if @config.ssh.private_key_path
          info[:private_key_path] = @config.ssh.private_key_path
        elsif info[:keys_only]
          info[:private_key_path] = @env.default_private_key_path
        end
      end

      # If we have a private key in our data dir, then use that
      if @data_dir && !@config.ssh.private_key_path
        data_private_key = @data_dir.join("private_key")
        if data_private_key.file?
          info[:private_key_path] = [data_private_key.to_s]
        end
      end

      # Setup the keys
      info[:private_key_path] ||= []
      info[:private_key_path] = Array(info[:private_key_path])

      # Expand the private key path relative to the root path
      info[:private_key_path].map! do |path|
        File.expand_path(path, @env.root_path)
      end

      # Check that the private key permissions are valid
      info[:private_key_path].each do |path|
        key_path = Pathname.new(path)
        if key_path.exist?
          Vagrant::Util::SSH.check_key_permissions(key_path)
        end
      end

      # Return the final compiled SSH info data
      info
    end
def ssh_info
      # First, ask the provider for their information. If the provider
      # returns nil, then the machine is simply not ready for SSH, and
      # we return nil as well.
      info = @provider.ssh_info
      return nil if info.nil?

      # Delete out the nil entries.
      info.dup.each do |key, value|
        info.delete(key) if value.nil?
      end

      # We set the defaults
      info[:host] ||= @config.ssh.default.host
      info[:port] ||= @config.ssh.default.port
      info[:private_key_path] ||= @config.ssh.default.private_key_path
      info[:keys_only] ||= @config.ssh.default.keys_only
      info[:verify_host_key] ||= @config.ssh.default.verify_host_key
      info[:username] ||= @config.ssh.default.username
      info[:remote_user] ||= @config.ssh.default.remote_user
      info[:compression] ||= @config.ssh.default.compression
      info[:dsa_authentication] ||= @config.ssh.default.dsa_authentication
      info[:extra_args] ||= @config.ssh.default.extra_args
      info[:config] ||= @config.ssh.default.config

      # We set overrides if they are set. These take precedence over
      # provider-returned data.
      info[:host] = @config.ssh.host if @config.ssh.host
      info[:port] = @config.ssh.port if @config.ssh.port
      info[:keys_only] = @config.ssh.keys_only
      info[:verify_host_key] = @config.ssh.verify_host_key
      info[:compression] = @config.ssh.compression
      info[:dsa_authentication] = @config.ssh.dsa_authentication
      info[:username] = @config.ssh.username if @config.ssh.username
      info[:password] = @config.ssh.password if @config.ssh.password
      info[:remote_user] = @config.ssh.remote_user if @config.ssh.remote_user
      info[:extra_args] = @config.ssh.extra_args if @config.ssh.extra_args
      info[:config] = @config.ssh.config if @config.ssh.config

      # We also set some fields that are purely controlled by Vagrant
      info[:forward_agent] = @config.ssh.forward_agent
      info[:forward_x11]   = @config.ssh.forward_x11
      info[:forward_env]   = @config.ssh.forward_env

      info[:ssh_command] = @config.ssh.ssh_command if @config.ssh.ssh_command

      # Add in provided proxy command config
      info[:proxy_command] = @config.ssh.proxy_command if @config.ssh.proxy_command

      # Set the private key path. If a specific private key is given in
      # the Vagrantfile we set that. Otherwise, we use the default (insecure)
      # private key, but only if the provider didn't give us one.
      if !info[:private_key_path] && !info[:password]
        if @config.ssh.private_key_path
          info[:private_key_path] = @config.ssh.private_key_path
        elsif info[:keys_only]
          info[:private_key_path] = @env.default_private_key_path
        end
      end

      # If we have a private key in our data dir, then use that
      if @data_dir && !@config.ssh.private_key_path
        data_private_key = @data_dir.join("private_key")
        if data_private_key.file?
          info[:private_key_path] = [data_private_key.to_s]
        end
      end

      # Setup the keys
      info[:private_key_path] ||= []
      info[:private_key_path] = Array(info[:private_key_path])

      # Expand the private key path relative to the root path
      info[:private_key_path].map! do |path|
        File.expand_path(path, @env.root_path)
      end

      # Check that the private key permissions are valid
      info[:private_key_path].each do |path|
        key_path = Pathname.new(path)
        if key_path.exist?
          Vagrant::Util::SSH.check_key_permissions(key_path)
        end
      end

      # Return the final compiled SSH info data
      info
    end
This returns the SSH info for accessing this machine. This SSH info
 is queried from the underlying provider. This method returns `nil` if
 the machine is not ready for SSH communication.

 The structure of the resulting hash is guaranteed to contain the
 following structure, although it may return other keys as well
 not documented here:

     {
       host: "1.2.3.4",
       port: "22",
       username: "mitchellh",
       private_key_path: "/path/to/my/key"
     }

 Note that Vagrant makes no guarantee that this info works or is
 correct. This is simply the data that the provider gives us or that
 is configured via a Vagrantfile. It is still possible after this
 point when attempting to connect via SSH to get authentication
 errors.

 @return [Hash] SSH information.