Bootstrap windows winrm not working with network error

I am trying to load windows winrm with the knife command.

I enabled tcp port 5985. But I still get the following error:

ERROR: Network error: connection refused - connect (2) (http: //: 5985)

I can also log in remotely with a username and password

I could not decide. Has anyone encountered this problem and found a solution?

+4
source share
2 answers

Make sure you can telnet remote_host 5985. This should open a silent session in which you can enter "quit". If not, look again at how you enabled winrm and the firewall on the remote host.

winrm, Windows, , :

Windows, ...

winrm:

winrm quickconfig -q

( winrm):

sc config mpssvc start= demand
sc start mpssvc

winrm -:

winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"}
winrm set winrm/config @{MaxTimeoutms="1800000"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/service/auth @{Basic="true"}

:

sc stop mpssvc

... , winrm .

, , :

, winrm

telnet remote_host 5985

( , telnet. "quit", .)

, winrm (, c: \)

knife winrm -m remote_host -x remote_user -P remote_password 'dir c:\'

node

knife bootstrap windows winrm remote_host -x remote_user -P remote_password

/ , , , , winstrap :

+8

. , .

. , winrm knant can not . , , , .

RubyGems, :

    $ /opt/chef/embedded/bin/gem install knife-windows

, /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/

0

All Articles