πŸ‡¬πŸ‡§ | πŸ‡©πŸ‡ͺ | πŸ‡«πŸ‡· | πŸ‡ͺπŸ‡Έ | πŸ‡¨πŸ‡³ | πŸ‡ΈπŸ‡¦
We don't have DLL but we have:
Windows File Analyzer & Online Fast Antivirus

A minimalist interface featuring quick search, convenient uploading, and a clean section structure.

πŸ›‘οΈπŸ” Fast verify your file, just drop on this page.
Virus check, hashes, sign verify, architecture, AI info.

How to fix "The connection to the specified remote host was refused."

This common Windows error frequently occurs when using tools like Windows Remote Management (WinRM), PowerShell Remoting, Remote Desktop (RDP), or SSH. It means the physical network path to the machine exists, but the remote host is choosing not to accept traffic on that specific port. The most frequent causes include:


Step-by-Step Easy Fixes

Follow these troubleshooting steps in order to resolve the connection refusal issue.

Step 1: Verify the Remote Service is Running

The most common cause is that the service you are trying to connect to is stopped on the remote machine. If you are using PowerShell Remoting or WinRM, you must ensure the WinRM service is active.

  1. Click the Start menu on the remote computer, type services.msc, and press Enter.
  2. Scroll down the list to find Windows Remote Management (WS-Management).
  3. Check the Status column. If it does not say Running, right-click the service and select Start.
  4. To ensure it stays active, right-click the service, select Properties, change the Startup type to Automatic, and click OK.

Step 2: Enable and Configure WinRM Quick Config

If you are attempting a PowerShell remote connection, the remote host must be explicitly configured to accept remote management requests.

  1. Open the Start menu on the remote machine, type cmd or PowerShell.
  2. Right-click on Command Prompt or Windows PowerShell and select Run as administrator.
  3. Type the following command and press Enter:
    winrm quickconfig
  4. If prompted to make changes and analyze the system, type y (Yes) and press Enter to confirm. This command automatically starts the service, sets the startup type to automatic, and configures a default firewall exception.

Step 3: Check Windows Firewall Settings

Even if the service is running, the Windows Defender Firewall on the remote machine might be blocking incoming traffic on the required ports (Port 5985 for HTTP WinRM, or Port 5986 for HTTPS WinRM).

  1. Open the Start menu on the remote computer, type control firewall.cpl, and press Enter.
  2. Click on Allow an app or feature through Windows Defender Firewall in the left-hand menu.
  3. Click the Change settings button at the top right (administrator privileges required).
  4. Scroll down and locate Windows Remote Management.
  5. Check the boxes for both Private and Public networks to allow the traffic through.
  6. Click OK to save the changes.

Step 4: Verify Network Location Profile

Windows often restricts remote connections if your network profile is inadvertently set to "Public" instead of "Private".

  1. Click on the Network/Wi-Fi icon in your Windows system tray (bottom right corner).
  2. Click on Properties under your active network connection.
  3. Under Network profile type, change the selection from Public to Private.
  4. Perform this check on both the client and the remote computer to ensure smooth communication.

Step 5: Configure the TrustedHosts List (For Non-Domain Environments)

If your computers are part of a Workgroup rather than a local Active Directory Domain, the client computer will refuse to connect to a remote host unless it explicitly trusts it.

  1. On your local client computer, open Windows PowerShell as an Administrator.
  2. Run the following command to allow your computer to connect to any remote host (or replace the asterisk with the specific IP address of the remote host for better security):
    Set-Item WSMan:\localhost\Client\TrustedHosts -Value * -Force
  3. Restart the WinRM service on your local computer to apply the new trust configuration by running:
    Restart-Service WinRM

ERROR_WSMAN_UNSUPPORTED_HTTP_STATUS_REDIRECT | ERROR_WSMAN_HTTP_REQUEST_TOO_LARGE_STATUS | ERROR_WSMAN_HTTP_NOT_FOUND_STATUS | ERROR_WSMAN_EVENTING_MISSING_LOCALE_IN_DELIVERY | ERROR_WSMAN_QUICK_CONFIG_FIREWALL_EXCEPTIONS_DISALLOWED

There may be some errors. Learn Microsoft