Sha256: fa763afd885b25646648b5cf317ccd99fbbbf898540aeb0e396dc2064e895fa8

Contents?: true

Size: 789 Bytes

Versions: 5

Compression:

Stored size: 789 Bytes

Contents

module VagrantPlugins
  module HostWindows
    module Cap
      class SSH
        # Set the ownership and permissions for SSH
        # private key
        #
        # @param [Vagrant::Environment] env
        # @param [Pathname] key_path
        def self.set_ssh_key_permissions(env, key_path)
          script_path = Host.scripts_path.join("set_ssh_key_permissions.ps1")
          result = Vagrant::Util::PowerShell.execute(
            script_path.to_s, "-KeyPath", key_path.to_s.gsub(' ', '` '),
            module_path: Host.modules_path.to_s
          )
          if result.exit_code != 0
            raise Vagrant::Errors::PowerShellError,
              script: script_path,
              stderr: result.stderr
          end
          result
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
vagrant-unbundled-2.3.6.0 plugins/hosts/windows/cap/ssh.rb
tamtam-vagrant-reload-1.2.1 vendor/cache/vagrant-2092df529ae7/plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.3.3.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.3.2.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.19.0 plugins/hosts/windows/cap/ssh.rb