The error "Could not connect to target instance" shows up while installing Chef. What do I do?

Ensure that all the following prerequisites are satisfied


Port 22 opened (if your instance supports SG)


  1. Port 5985 is opened  (if your instance supports SG) 
  2. WinRM configured properly as follows
    Run the following commands in command prompt (Run as administrator) 
    winrm quickconfig -q 
    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"}
  3. Also make sure that 5985 port is accessible outside - In Inbound firewall rules' scope for WinRM, it has to be "Any IP address" 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request