winrm 1.2.0.dev1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +21 -3
- data/VERSION +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c3acfe714f1a55013dc15af581c52eb75c1ae0e
|
4
|
+
data.tar.gz: df2ca6f9c29b249058aebb111f1c42631a033294
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76440fae9da8a3b989afee26d092e6cf1ae7c2cc9824ae87c3b4aa6d4826f5b88193af75ba29610fcb819e0447278cd108218b0d96d3b35f5db0a8799e597345
|
7
|
+
data.tar.gz: 314d60dd2cecd17d2f306b90c4ec30be04a2bd7957cbb09e057082fa7376c22296e35056baf6c7f8dbfeb3ab9c78f48f477aa5a4547a3a5ab65275e05de6192c
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ site: http://msdn.microsoft.com/en-us/library/aa384426(v=VS.85).aspx
|
|
14
14
|
## Example
|
15
15
|
```ruby
|
16
16
|
require 'winrm'
|
17
|
-
endpoint = http://mywinrmhost:5985/wsman
|
17
|
+
endpoint = 'http://mywinrmhost:5985/wsman'
|
18
18
|
krb5_realm = 'EXAMPLE.COM'
|
19
19
|
winrm = WinRM::WinRMWebService.new(endpoint, :kerberos, :realm => krb5_realm)
|
20
20
|
winrm.cmd('ipconfig /all') do |stdout, stderr|
|
@@ -39,11 +39,29 @@ WinRM::WinRMWebService.new(endpoint, :plaintext, :user => myuser, :pass => mypas
|
|
39
39
|
```ruby
|
40
40
|
WinRM::WinRMWebService.new(endpoint, :ssl, :user => myuser, :pass => mypass, :disable_sspi => true)
|
41
41
|
|
42
|
-
|
42
|
+
# Specifying CA path
|
43
43
|
WinRM::WinRMWebService.new(endpoint, :ssl, :user => myuser, :pass => mypass, :ca_trust_path => '/etc/ssl/certs/cert.pem', :basic_auth_only => true)
|
44
44
|
|
45
|
-
|
45
|
+
# Same but force basic authentication:
|
46
46
|
WinRM::WinRMWebService.new(endpoint, :ssl, :user => myuser, :pass => mypass, :basic_auth_only => true)
|
47
|
+
|
48
|
+
# Basic auth over SSL w/self signed cert
|
49
|
+
# Enabling no_ssl_peer_verification is not recommended. HTTPS connections are still encrypted,
|
50
|
+
# but the WinRM gem is not able to detect forged replies or man in the middle attacks.
|
51
|
+
WinRM::WinRMWebService.new(endpoint, :ssl, :user => myuser, :pass => mypass, :basic_auth_only => true, :no_ssl_peer_verification => true)
|
52
|
+
```
|
53
|
+
|
54
|
+
##### Create a self signed cert for WinRM
|
55
|
+
You may want to create a self signed certificate for servicing https WinRM connections. First you must install makecert.exe from the Windows SDK, then you can use the following PowerShell script to create a cert and enable the WinRM HTTPS listener.
|
56
|
+
|
57
|
+
```powershell
|
58
|
+
$hostname = $Env:ComputerName
|
59
|
+
|
60
|
+
C:\"Program Files"\"Microsoft SDKs"\Windows\v7.1\Bin\makecert.exe -r -pe -n "CN=$hostname,O=vagrant" -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 "$hostname.cer"
|
61
|
+
|
62
|
+
$thumbprint = (& ls cert:LocalMachine/my).Thumbprint
|
63
|
+
$cmd = "winrm create winrm/config/Listener?Address=*+Transport=HTTPS '@{Hostname=`"$hostname`";CertificateThumbprint=`"$thumbprint`"}'"
|
64
|
+
iex $cmd
|
47
65
|
```
|
48
66
|
|
49
67
|
#### Kerberos
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.0
|
1
|
+
1.2.0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: winrm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.0
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Wanek
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gssapi
|
@@ -203,9 +203,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
203
203
|
version: 1.9.0
|
204
204
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- - '
|
206
|
+
- - '>='
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version:
|
208
|
+
version: '0'
|
209
209
|
requirements: []
|
210
210
|
rubyforge_project:
|
211
211
|
rubygems_version: 2.0.14
|