Sha256: e8d4a5ad72e4f063912e1d87368e889cec63338502cb4468af33844d85b56ebb

Contents?: true

Size: 773 Bytes

Versions: 24

Compression:

Stored size: 773 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,
            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

24 entries across 20 versions & 3 rubygems

Version Path
vagrant-unbundled-2.2.18.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.16.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.14.0 plugins/hosts/windows/cap/ssh.rb
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.10.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.9.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.8.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.7.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.6.2 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.6.1 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.6.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.5.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.4.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.3.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.2.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.2.0.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.1.4.0 plugins/hosts/windows/cap/ssh.rb
vagrant-unbundled-2.1.2.0 plugins/hosts/windows/cap/ssh.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/plugins/hosts/windows/cap/ssh.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/plugins/hosts/windows/cap/ssh.rb