Using winrm

Anyone know what this would be caused from? I’ve installed Windows Remote
Management and following the instructions on
http://docs.opscode.com/plugin_knife_windows.html. I’ve used this utility
once or twice before and remember it working:

knife bootstrap windows winrm v2mq13.theorchard.com -r

‘role[base_windows],role[windows]’ -x administrator -P $$$$$$$ -E
PRODUCTION -VV
DEBUG: Looking for bootstrap template in
/usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in
/usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
Bootstrapping Chef on windows
DEBUG: Adding windows
DEBUG: establishing connection to windows:22
DEBUG: connection established
INFO: negotiating protocol version
DEBUG: remote is SSH-2.0-OpenSSH_4.3' DEBUG: local isSSH-2.0-Ruby/Net::SSH_2.7.0 x86_64-linux’
DEBUG: read 704 bytes
DEBUG: received packet nr 0 type 20 len 700
INFO: got KEXINIT from server
INFO: sending KEXINIT
DEBUG: queueing packet nr 0 type 20 len 1508
DEBUG: sent 1512 bytes
INFO: negotiating algorithms
DEBUG: negotiated:

  • kex: diffie-hellman-group-exchange-sha1
  • host_key: ssh-rsa
  • encryption_server: aes128-cbc
  • encryption_client: aes128-cbc
  • hmac_client: hmac-sha1
  • hmac_server: hmac-sha1
  • compression_client: none
  • compression_server: none
  • language_client:
  • language_server:
    DEBUG: exchanging keys
    DEBUG: queueing packet nr 1 type 34 len 20
    DEBUG: sent 24 bytes
    DEBUG: read 152 bytes
    DEBUG: received packet nr 1 type 31 len 148
    DEBUG: queueing packet nr 2 type 32 len 140
    DEBUG: sent 144 bytes
    DEBUG: read 720 bytes
    DEBUG: received packet nr 2 type 33 len 700
    DEBUG: queueing packet nr 3 type 21 len 20
    DEBUG: sent 24 bytes
    DEBUG: received packet nr 3 type 21 len 12
    DEBUG: beginning authentication of `administrator’
    DEBUG: queueing packet nr 4 type 5 len 28
    DEBUG: sent 52 bytes
    DEBUG: read 52 bytes
    DEBUG: received packet nr 4 type 6 len 28
    DEBUG: trying none
    DEBUG: Mechanism none was requested, but isn’t a known type. Ignoring it.
    DEBUG: trying publickey
    DEBUG: connecting to ssh-agent
    ERROR: could not connect to ssh-agent
    DEBUG: trying hostbased
    DEBUG: trying password
    DEBUG: queueing packet nr 5 type 50 len 76
    DEBUG: sent 100 bytes
    DEBUG: read 84 bytes
    DEBUG: received packet nr 5 type 51 len 60
    DEBUG: allowed methods: publickey,gssapi-with-mic,password
    DEBUG: password failed
    ERROR: all authorization methods failed (tried none, publickey, hostbased,
    password)
    [root@nagios01 ~]#

  • Nikhil Shah */ System Administrator

nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com http://www.dailyrindblog.com/

Facebook http://www.facebook.com/theorchard /
@orchtweetshttp://www.twitter.com/orchtweets

Privileged And Confidential Communication.

This electronic transmission, and any documents attached hereto, (a) are
protected by the Electronic Communications Privacy Act (18 USC §§
2510-2521), (b) may contain confidential and/or legally privileged
information, and © are for the sole use of the intended recipient named
above. If you have received this electronic message in error, please notify
the sender and delete the electronic message. Any disclosure, copying,
distribution, or use of the contents of the information received in error
is strictly prohibited

Hello Nikhil,
Can you check the server settings of WinRM ? Check if AllowUnencrypted is
to true. Also if you are using the Negotiate protocol for Authentication -
supply the user name as \ . eg. WORKGROUP\Administrator.

Regards*,*
Chirag Jog
Chief Technology Officer,
Clogeny Technologies | http://clogeny.com
(M) 0091-9766619440 | Skype: chirag.jog

On Fri, Nov 22, 2013 at 12:40 PM, Nikhil Shah nshah@theorchard.com wrote:

Anyone know what this would be caused from? I've installed Windows Remote
Management and following the instructions on
knife windows. I've used this utility
once or twice before and remember it working:

knife bootstrap windows winrm v2mq13.theorchard.com -r

'role[base_windows],role[windows]' -x administrator -P $$$$$$$ -E
PRODUCTION -VV
DEBUG: Looking for bootstrap template in
/usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in
/usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
Bootstrapping Chef on windows
DEBUG: Adding windows
DEBUG: establishing connection to windows:22
DEBUG: connection established
INFO: negotiating protocol version
DEBUG: remote is SSH-2.0-OpenSSH_4.3' DEBUG: local is SSH-2.0-Ruby/Net::SSH_2.7.0 x86_64-linux'
DEBUG: read 704 bytes
DEBUG: received packet nr 0 type 20 len 700
INFO: got KEXINIT from server
INFO: sending KEXINIT
DEBUG: queueing packet nr 0 type 20 len 1508
DEBUG: sent 1512 bytes
INFO: negotiating algorithms
DEBUG: negotiated:

  • kex: diffie-hellman-group-exchange-sha1
  • host_key: ssh-rsa
  • encryption_server: aes128-cbc
  • encryption_client: aes128-cbc
  • hmac_client: hmac-sha1
  • hmac_server: hmac-sha1
  • compression_client: none
  • compression_server: none
  • language_client:
  • language_server:
    DEBUG: exchanging keys
    DEBUG: queueing packet nr 1 type 34 len 20
    DEBUG: sent 24 bytes
    DEBUG: read 152 bytes
    DEBUG: received packet nr 1 type 31 len 148
    DEBUG: queueing packet nr 2 type 32 len 140
    DEBUG: sent 144 bytes
    DEBUG: read 720 bytes
    DEBUG: received packet nr 2 type 33 len 700
    DEBUG: queueing packet nr 3 type 21 len 20
    DEBUG: sent 24 bytes
    DEBUG: received packet nr 3 type 21 len 12
    DEBUG: beginning authentication of `administrator'
    DEBUG: queueing packet nr 4 type 5 len 28
    DEBUG: sent 52 bytes
    DEBUG: read 52 bytes
    DEBUG: received packet nr 4 type 6 len 28
    DEBUG: trying none
    DEBUG: Mechanism none was requested, but isn't a known type. Ignoring it.
    DEBUG: trying publickey
    DEBUG: connecting to ssh-agent
    ERROR: could not connect to ssh-agent
    DEBUG: trying hostbased
    DEBUG: trying password
    DEBUG: queueing packet nr 5 type 50 len 76
    DEBUG: sent 100 bytes
    DEBUG: read 84 bytes
    DEBUG: received packet nr 5 type 51 len 60
    DEBUG: allowed methods: publickey,gssapi-with-mic,password
    DEBUG: password failed
    ERROR: all authorization methods failed (tried none, publickey, hostbased,
    password)
    [root@nagios01 ~]#

--

  • Nikhil Shah */ System Administrator

nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com http://www.dailyrindblog.com/

Facebook http://www.facebook.com/theorchard / @orchtweetshttp://www.twitter.com/orchtweets

Privileged And Confidential Communication.

This electronic transmission, and any documents attached hereto, (a) are
protected by the Electronic Communications Privacy Act (18 USC §§
2510-2521), (b) may contain confidential and/or legally privileged
information, and (c) are for the sole use of the intended recipient named
above. If you have received this electronic message in error, please notify
the sender and delete the electronic message. Any disclosure, copying,
distribution, or use of the contents of the information received in error
is strictly prohibited

C:\Windows\system32>winrm set winrm/config/service @{AllowUnencrypted="true"}
Service
RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 15
EnumerationTimeoutms = 60000
MaxConnections = 25
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = true
Auth
Basic = true
Kerberos = true
Negotiate = true
Certificate = false
CredSSP = false
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = *
IPv6Filter = *
EnableCompatibilityHttpListener = false
EnableCompatibilityHttpsListener = false
CertificateThumbprint

Also tried to use domain:

knife bootstrap windows winrm v2mq13.theorchard.com -r 'role[base_windows],role[windows]' -x avl\encagent -P ???????? -E PRODUCTION -VV
DEBUG: Looking for bootstrap template in /usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in /usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
Bootstrapping Chef on windows
DEBUG: Adding windows
DEBUG: establishing connection to windows:22
DEBUG: connection established
INFO: negotiating protocol version
DEBUG: remote is SSH-2.0-OpenSSH_4.3' DEBUG: local is SSH-2.0-Ruby/Net::SSH_2.7.0 x86_64-linux'
DEBUG: read 704 bytes
DEBUG: received packet nr 0 type 20 len 700
INFO: got KEXINIT from server
INFO: sending KEXINIT
DEBUG: queueing packet nr 0 type 20 len 1508
DEBUG: sent 1512 bytes
INFO: negotiating algorithms
DEBUG: negotiated:

  • kex: diffie-hellman-group-exchange-sha1
  • host_key: ssh-rsa
  • encryption_server: aes128-cbc
  • encryption_client: aes128-cbc
  • hmac_client: hmac-sha1
  • hmac_server: hmac-sha1
  • compression_client: none
  • compression_server: none
  • language_client:
  • language_server:
    DEBUG: exchanging keys
    DEBUG: queueing packet nr 1 type 34 len 20
    DEBUG: sent 24 bytes
    DEBUG: read 152 bytes
    DEBUG: received packet nr 1 type 31 len 148
    DEBUG: queueing packet nr 2 type 32 len 140
    DEBUG: sent 144 bytes
    DEBUG: read 720 bytes
    DEBUG: received packet nr 2 type 33 len 700
    DEBUG: queueing packet nr 3 type 21 len 20
    DEBUG: sent 24 bytes
    DEBUG: received packet nr 3 type 21 len 12
    DEBUG: beginning authentication of `avl\encagent'
    DEBUG: queueing packet nr 4 type 5 len 28
    DEBUG: sent 52 bytes
    DEBUG: read 52 bytes
    DEBUG: received packet nr 4 type 6 len 28
    DEBUG: trying none
    DEBUG: Mechanism none was requested, but isn't a known type. Ignoring it.
    DEBUG: trying publickey
    DEBUG: connecting to ssh-agent
    ERROR: could not connect to ssh-agent
    DEBUG: trying hostbased
    DEBUG: trying password
    DEBUG: queueing packet nr 5 type 50 len 76
    DEBUG: sent 100 bytes
    DEBUG: read 84 bytes
    DEBUG: received packet nr 5 type 51 len 60
    DEBUG: allowed methods: publickey,gssapi-with-mic,password
    DEBUG: password failed
    ERROR: all authorization methods failed (tried none, publickey, hostbased, password)

Nikhil Shah / System Administrator
nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com
Facebook / @orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

On Nov 22, 2013, at 3:46 PM, Chirag Jog chirag@clogeny.com wrote:

Hello Nikhil,
Can you check the server settings of WinRM ? Check if AllowUnencrypted is to true. Also if you are using the Negotiate protocol for Authentication - supply the user name as \ . eg. WORKGROUP\Administrator.

Regards,
Chirag Jog
Chief Technology Officer,
Clogeny Technologies | http://clogeny.com
(M) 0091-9766619440 | Skype: chirag.jog

On Fri, Nov 22, 2013 at 12:40 PM, Nikhil Shah nshah@theorchard.com wrote:
Anyone know what this would be caused from? I've installed Windows Remote Management and following the instructions on knife windows. I've used this utility once or twice before and remember it working:

knife bootstrap windows winrm v2mq13.theorchard.com -r 'role[base_windows],role[windows]' -x administrator -P $$$$$$$ -E PRODUCTION -VV

DEBUG: Looking for bootstrap template in /usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in /usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
Bootstrapping Chef on windows
DEBUG: Adding windows
DEBUG: establishing connection to windows:22
DEBUG: connection established
INFO: negotiating protocol version
DEBUG: remote is SSH-2.0-OpenSSH_4.3' DEBUG: local is SSH-2.0-Ruby/Net::SSH_2.7.0 x86_64-linux'
DEBUG: read 704 bytes
DEBUG: received packet nr 0 type 20 len 700
INFO: got KEXINIT from server
INFO: sending KEXINIT
DEBUG: queueing packet nr 0 type 20 len 1508
DEBUG: sent 1512 bytes
INFO: negotiating algorithms
DEBUG: negotiated:

  • kex: diffie-hellman-group-exchange-sha1
  • host_key: ssh-rsa
  • encryption_server: aes128-cbc
  • encryption_client: aes128-cbc
  • hmac_client: hmac-sha1
  • hmac_server: hmac-sha1
  • compression_client: none
  • compression_server: none
  • language_client:
  • language_server:
    DEBUG: exchanging keys
    DEBUG: queueing packet nr 1 type 34 len 20
    DEBUG: sent 24 bytes
    DEBUG: read 152 bytes
    DEBUG: received packet nr 1 type 31 len 148
    DEBUG: queueing packet nr 2 type 32 len 140
    DEBUG: sent 144 bytes
    DEBUG: read 720 bytes
    DEBUG: received packet nr 2 type 33 len 700
    DEBUG: queueing packet nr 3 type 21 len 20
    DEBUG: sent 24 bytes
    DEBUG: received packet nr 3 type 21 len 12
    DEBUG: beginning authentication of `administrator'
    DEBUG: queueing packet nr 4 type 5 len 28
    DEBUG: sent 52 bytes
    DEBUG: read 52 bytes
    DEBUG: received packet nr 4 type 6 len 28
    DEBUG: trying none
    DEBUG: Mechanism none was requested, but isn't a known type. Ignoring it.
    DEBUG: trying publickey
    DEBUG: connecting to ssh-agent
    ERROR: could not connect to ssh-agent
    DEBUG: trying hostbased
    DEBUG: trying password
    DEBUG: queueing packet nr 5 type 50 len 76
    DEBUG: sent 100 bytes
    DEBUG: read 84 bytes
    DEBUG: received packet nr 5 type 51 len 60
    DEBUG: allowed methods: publickey,gssapi-with-mic,password
    DEBUG: password failed
    ERROR: all authorization methods failed (tried none, publickey, hostbased, password)
    [root@nagios01 ~]#

--
Nikhil Shah / System Administrator

nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com

Facebook / @orchtweets

Privileged And Confidential Communication.

This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited

Are you sure you have the knife-windows plugin installed?

This looks like what you'll see when knife doesn't find it:

DEBUG: establishing connection to windows:22

/Jeppe

On Fri, Nov 22, 2013 at 9:40 PM, Nikhil Shah nshah@theorchard.com wrote:

Anyone know what this would be caused from? I've installed Windows Remote
Management and following the instructions on
knife windows. I've used this utility
once or twice before and remember it working:

knife bootstrap windows winrm v2mq13.theorchard.com -r

'role[base_windows],role[windows]' -x administrator -P $$$$$$$ -E
PRODUCTION -VV
DEBUG: Looking for bootstrap template in
/usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in
/usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
Bootstrapping Chef on windows
DEBUG: Adding windows
DEBUG: establishing connection to windows:22
DEBUG: connection established
INFO: negotiating protocol version
DEBUG: remote is SSH-2.0-OpenSSH_4.3' DEBUG: local is SSH-2.0-Ruby/Net::SSH_2.7.0 x86_64-linux'
DEBUG: read 704 bytes
DEBUG: received packet nr 0 type 20 len 700
INFO: got KEXINIT from server
INFO: sending KEXINIT
DEBUG: queueing packet nr 0 type 20 len 1508
DEBUG: sent 1512 bytes
INFO: negotiating algorithms
DEBUG: negotiated:

  • kex: diffie-hellman-group-exchange-sha1
  • host_key: ssh-rsa
  • encryption_server: aes128-cbc
  • encryption_client: aes128-cbc
  • hmac_client: hmac-sha1
  • hmac_server: hmac-sha1
  • compression_client: none
  • compression_server: none
  • language_client:
  • language_server:
    DEBUG: exchanging keys
    DEBUG: queueing packet nr 1 type 34 len 20
    DEBUG: sent 24 bytes
    DEBUG: read 152 bytes
    DEBUG: received packet nr 1 type 31 len 148
    DEBUG: queueing packet nr 2 type 32 len 140
    DEBUG: sent 144 bytes
    DEBUG: read 720 bytes
    DEBUG: received packet nr 2 type 33 len 700
    DEBUG: queueing packet nr 3 type 21 len 20
    DEBUG: sent 24 bytes
    DEBUG: received packet nr 3 type 21 len 12
    DEBUG: beginning authentication of `administrator'
    DEBUG: queueing packet nr 4 type 5 len 28
    DEBUG: sent 52 bytes
    DEBUG: read 52 bytes
    DEBUG: received packet nr 4 type 6 len 28
    DEBUG: trying none
    DEBUG: Mechanism none was requested, but isn't a known type. Ignoring it.
    DEBUG: trying publickey
    DEBUG: connecting to ssh-agent
    ERROR: could not connect to ssh-agent
    DEBUG: trying hostbased
    DEBUG: trying password
    DEBUG: queueing packet nr 5 type 50 len 76
    DEBUG: sent 100 bytes
    DEBUG: read 84 bytes
    DEBUG: received packet nr 5 type 51 len 60
    DEBUG: allowed methods: publickey,gssapi-with-mic,password
    DEBUG: password failed
    ERROR: all authorization methods failed (tried none, publickey, hostbased,
    password)
    [root@nagios01 ~]#

--

  • Nikhil Shah */ System Administrator

nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com http://www.dailyrindblog.com/

Facebook http://www.facebook.com/theorchard / @orchtweetshttp://www.twitter.com/orchtweets

Privileged And Confidential Communication.

This electronic transmission, and any documents attached hereto, (a) are
protected by the Electronic Communications Privacy Act (18 USC §§
2510-2521), (b) may contain confidential and/or legally privileged
information, and (c) are for the sole use of the intended recipient named
above. If you have received this electronic message in error, please notify
the sender and delete the electronic message. Any disclosure, copying,
distribution, or use of the contents of the information received in error
is strictly prohibited

yea, unless I am doing something wrong:

[root@nagios01 chef-repo_prod]# /opt/chef/embedded/bin/gem install knife-windows
Successfully installed knife-windows-0.5.14
1 gem installed
Nikhil Shah / System Administrator
nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com
Facebook / @orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

On Nov 22, 2013, at 4:23 PM, Jeppe Nejsum Madsen jeppe@ingolfs.dk wrote:

Are you sure you have the knife-windows plugin installed?

This looks like what you'll see when knife doesn't find it:

DEBUG: establishing connection to windows:22

/Jeppe

On Fri, Nov 22, 2013 at 9:40 PM, Nikhil Shah nshah@theorchard.com wrote:
Anyone know what this would be caused from? I've installed Windows Remote Management and following the instructions on knife windows. I've used this utility once or twice before and remember it working:

knife bootstrap windows winrm v2mq13.theorchard.com -r 'role[base_windows],role[windows]' -x administrator -P $$$$$$$ -E PRODUCTION -VV

DEBUG: Looking for bootstrap template in /usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in /usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
Bootstrapping Chef on windows
DEBUG: Adding windows
DEBUG: establishing connection to windows:22
DEBUG: connection established
INFO: negotiating protocol version
DEBUG: remote is SSH-2.0-OpenSSH_4.3' DEBUG: local is SSH-2.0-Ruby/Net::SSH_2.7.0 x86_64-linux'
DEBUG: read 704 bytes
DEBUG: received packet nr 0 type 20 len 700
INFO: got KEXINIT from server
INFO: sending KEXINIT
DEBUG: queueing packet nr 0 type 20 len 1508
DEBUG: sent 1512 bytes
INFO: negotiating algorithms
DEBUG: negotiated:

  • kex: diffie-hellman-group-exchange-sha1
  • host_key: ssh-rsa
  • encryption_server: aes128-cbc
  • encryption_client: aes128-cbc
  • hmac_client: hmac-sha1
  • hmac_server: hmac-sha1
  • compression_client: none
  • compression_server: none
  • language_client:
  • language_server:
    DEBUG: exchanging keys
    DEBUG: queueing packet nr 1 type 34 len 20
    DEBUG: sent 24 bytes
    DEBUG: read 152 bytes
    DEBUG: received packet nr 1 type 31 len 148
    DEBUG: queueing packet nr 2 type 32 len 140
    DEBUG: sent 144 bytes
    DEBUG: read 720 bytes
    DEBUG: received packet nr 2 type 33 len 700
    DEBUG: queueing packet nr 3 type 21 len 20
    DEBUG: sent 24 bytes
    DEBUG: received packet nr 3 type 21 len 12
    DEBUG: beginning authentication of `administrator'
    DEBUG: queueing packet nr 4 type 5 len 28
    DEBUG: sent 52 bytes
    DEBUG: read 52 bytes
    DEBUG: received packet nr 4 type 6 len 28
    DEBUG: trying none
    DEBUG: Mechanism none was requested, but isn't a known type. Ignoring it.
    DEBUG: trying publickey
    DEBUG: connecting to ssh-agent
    ERROR: could not connect to ssh-agent
    DEBUG: trying hostbased
    DEBUG: trying password
    DEBUG: queueing packet nr 5 type 50 len 76
    DEBUG: sent 100 bytes
    DEBUG: read 84 bytes
    DEBUG: received packet nr 5 type 51 len 60
    DEBUG: allowed methods: publickey,gssapi-with-mic,password
    DEBUG: password failed
    ERROR: all authorization methods failed (tried none, publickey, hostbased, password)
    [root@nagios01 ~]#

--
Nikhil Shah / System Administrator

nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com

Facebook / @orchtweets

Privileged And Confidential Communication.

This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited

Strange

What does knife | grep windows output

Should look like this:

$ knife | grep windows
knife bootstrap windows ssh FQDN (options)
knife bootstrap windows winrm FQDN (options)
knife bootstrap windows winrm FQDN (options)
knife bootstrap windows ssh FQDN (options)

/Jeppe

On Fri, Nov 22, 2013 at 10:32 PM, Nikhil Shah nshah@theorchard.com wrote:

yea, unless I am doing something wrong:

[root@nagios01 chef-repo_prod]# /opt/chef/embedded/bin/gem install
knife-windows
Successfully installed knife-windows-0.5.14
1 gem installed
*Nikhil Shah */ System Administrator
nshah@theorchard.com drudolph@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com http://www.dailyrindblog.com/
Facebook http://www.facebook.com/theorchard / @orchtweetshttp://www.twitter.com/orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are
protected by the Electronic Communications Privacy Act (18 USC §§
2510-2521), (b) may contain confidential and/or legally privileged
information, and (c) are for the sole use of the intended recipient named
above. If you have received this electronic message in error, please notify
the sender and delete the electronic message. Any disclosure, copying,
distribution, or use of the contents of the information received in error
is strictly prohibited.

On Nov 22, 2013, at 4:23 PM, Jeppe Nejsum Madsen jeppe@ingolfs.dk wrote:

Are you sure you have the knife-windows plugin installed?

This looks like what you'll see when knife doesn't find it:

DEBUG: establishing connection to windows:22

/Jeppe

On Fri, Nov 22, 2013 at 9:40 PM, Nikhil Shah nshah@theorchard.com wrote:

Anyone know what this would be caused from? I've installed Windows Remote
Management and following the instructions on
knife windows. I've used this
utility once or twice before and remember it working:

knife bootstrap windows winrm v2mq13.theorchard.com -r

'role[base_windows],role[windows]' -x administrator -P $$$$$$$ -E
PRODUCTION -VV
DEBUG: Looking for bootstrap template in
/usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in
/usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
Bootstrapping Chef on windows
DEBUG: Adding windows
DEBUG: establishing connection to windows:22
DEBUG: connection established
INFO: negotiating protocol version
DEBUG: remote is SSH-2.0-OpenSSH_4.3' DEBUG: local is SSH-2.0-Ruby/Net::SSH_2.7.0 x86_64-linux'
DEBUG: read 704 bytes
DEBUG: received packet nr 0 type 20 len 700
INFO: got KEXINIT from server
INFO: sending KEXINIT
DEBUG: queueing packet nr 0 type 20 len 1508
DEBUG: sent 1512 bytes
INFO: negotiating algorithms
DEBUG: negotiated:

  • kex: diffie-hellman-group-exchange-sha1
  • host_key: ssh-rsa
  • encryption_server: aes128-cbc
  • encryption_client: aes128-cbc
  • hmac_client: hmac-sha1
  • hmac_server: hmac-sha1
  • compression_client: none
  • compression_server: none
  • language_client:
  • language_server:
    DEBUG: exchanging keys
    DEBUG: queueing packet nr 1 type 34 len 20
    DEBUG: sent 24 bytes
    DEBUG: read 152 bytes
    DEBUG: received packet nr 1 type 31 len 148
    DEBUG: queueing packet nr 2 type 32 len 140
    DEBUG: sent 144 bytes
    DEBUG: read 720 bytes
    DEBUG: received packet nr 2 type 33 len 700
    DEBUG: queueing packet nr 3 type 21 len 20
    DEBUG: sent 24 bytes
    DEBUG: received packet nr 3 type 21 len 12
    DEBUG: beginning authentication of `administrator'
    DEBUG: queueing packet nr 4 type 5 len 28
    DEBUG: sent 52 bytes
    DEBUG: read 52 bytes
    DEBUG: received packet nr 4 type 6 len 28
    DEBUG: trying none
    DEBUG: Mechanism none was requested, but isn't a known type. Ignoring it.
    DEBUG: trying publickey
    DEBUG: connecting to ssh-agent
    ERROR: could not connect to ssh-agent
    DEBUG: trying hostbased
    DEBUG: trying password
    DEBUG: queueing packet nr 5 type 50 len 76
    DEBUG: sent 100 bytes
    DEBUG: read 84 bytes
    DEBUG: received packet nr 5 type 51 len 60
    DEBUG: allowed methods: publickey,gssapi-with-mic,password
    DEBUG: password failed
    ERROR: all authorization methods failed (tried none, publickey,
    hostbased, password)
    [root@nagios01 ~]#

--

  • Nikhil Shah */ System Administrator

nshah@theorchard.com http://theorchard.com/

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com http://www.dailyrindblog.com/

Facebook http://www.facebook.com/theorchard / @orchtweetshttp://www.twitter.com/orchtweets

Privileged And Confidential Communication.

This electronic transmission, and any documents attached hereto, (a) are
protected by the Electronic Communications Privacy Act (18 USC §§
2510-2521), (b) may contain confidential and/or legally privileged
information, and (c) are for the sole use of the intended recipient named
above. If you have received this electronic message in error, please notify
the sender and delete the electronic message. Any disclosure, copying,
distribution, or use of the contents of the information received in error
is strictly prohibited

Just wanted to follow up with this email to see if anyone else might have any insight as th why I’m receiving authorization failed.
Nikhil Shah / System Administrator
nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com
Facebook / @orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

On Nov 22, 2013, at 4:32 PM, Nikhil Shah nshah@theorchard.com wrote:

yea, unless I am doing something wrong:

[root@nagios01 chef-repo_prod]# /opt/chef/embedded/bin/gem install knife-windows
Successfully installed knife-windows-0.5.14
1 gem installed
Nikhil Shah / System Administrator
nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com
Facebook / @orchtweets

Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

On Nov 22, 2013, at 4:23 PM, Jeppe Nejsum Madsen jeppe@ingolfs.dk wrote:

Are you sure you have the knife-windows plugin installed?

This looks like what you'll see when knife doesn't find it:

DEBUG: establishing connection to windows:22

/Jeppe

On Fri, Nov 22, 2013 at 9:40 PM, Nikhil Shah nshah@theorchard.com wrote:
Anyone know what this would be caused from? I've installed Windows Remote Management and following the instructions on knife windows. I've used this utility once or twice before and remember it working:

knife bootstrap windows winrm v2mq13.theorchard.com -r 'role[base_windows],role[windows]' -x administrator -P $$$$$$$ -E PRODUCTION -VV

DEBUG: Looking for bootstrap template in /usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in /usr/lib64/ruby/gems/1.8/gems/chef-11.8.0/lib/chef/knife/bootstrap
Bootstrapping Chef on windows
DEBUG: Adding windows
DEBUG: establishing connection to windows:22
DEBUG: connection established
INFO: negotiating protocol version
DEBUG: remote is SSH-2.0-OpenSSH_4.3' DEBUG: local is SSH-2.0-Ruby/Net::SSH_2.7.0 x86_64-linux'
DEBUG: read 704 bytes
DEBUG: received packet nr 0 type 20 len 700
INFO: got KEXINIT from server
INFO: sending KEXINIT
DEBUG: queueing packet nr 0 type 20 len 1508
DEBUG: sent 1512 bytes
INFO: negotiating algorithms
DEBUG: negotiated:

  • kex: diffie-hellman-group-exchange-sha1
  • host_key: ssh-rsa
  • encryption_server: aes128-cbc
  • encryption_client: aes128-cbc
  • hmac_client: hmac-sha1
  • hmac_server: hmac-sha1
  • compression_client: none
  • compression_server: none
  • language_client:
  • language_server:
    DEBUG: exchanging keys
    DEBUG: queueing packet nr 1 type 34 len 20
    DEBUG: sent 24 bytes
    DEBUG: read 152 bytes
    DEBUG: received packet nr 1 type 31 len 148
    DEBUG: queueing packet nr 2 type 32 len 140
    DEBUG: sent 144 bytes
    DEBUG: read 720 bytes
    DEBUG: received packet nr 2 type 33 len 700
    DEBUG: queueing packet nr 3 type 21 len 20
    DEBUG: sent 24 bytes
    DEBUG: received packet nr 3 type 21 len 12
    DEBUG: beginning authentication of `administrator'
    DEBUG: queueing packet nr 4 type 5 len 28
    DEBUG: sent 52 bytes
    DEBUG: read 52 bytes
    DEBUG: received packet nr 4 type 6 len 28
    DEBUG: trying none
    DEBUG: Mechanism none was requested, but isn't a known type. Ignoring it.
    DEBUG: trying publickey
    DEBUG: connecting to ssh-agent
    ERROR: could not connect to ssh-agent
    DEBUG: trying hostbased
    DEBUG: trying password
    DEBUG: queueing packet nr 5 type 50 len 76
    DEBUG: sent 100 bytes
    DEBUG: read 84 bytes
    DEBUG: received packet nr 5 type 51 len 60
    DEBUG: allowed methods: publickey,gssapi-with-mic,password
    DEBUG: password failed
    ERROR: all authorization methods failed (tried none, publickey, hostbased, password)
    [root@nagios01 ~]#

--
Nikhil Shah / System Administrator

nshah@theorchard.com

The Orchard® / www.theorchard.com

t (+1) 212.308.5648 / f (+1) 212.201.9203
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / www.dailyrindblog.com

Facebook / @orchtweets

Privileged And Confidential Communication.

This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited

On 11/26/2013 10:33 AM, Nikhil Shah wrote:

Just wanted to follow up with this email to see if anyone else might
have any insight as th why I’m receiving authorization failed.

As others have indicated, and as I recall you've had some trouble
with this in the past, make sure you are making use of the
'gem' executable you think you are.

DEBUG: establishing connection to windows:22
...
DEBUG: remote is `SSH-2.0-OpenSSH_4.3'
DEBUG: local is `SSH-2.0-Ruby/Net::SSH_2.7.0 x86_64-linux'

Your output shows

a) that WinRM is not being tried, but SSH to port 22 is
b) your command is trying to connect to a host named windows,
   so it is clear your hostname on the command-line is not
   being interpreted as such (v2mq13.theorchard.com).

Others pointed this out already.

Summary: Likely the knife you are using is not one whose Ruby
has the knife-windows gem installed, even though you
think it is.