Azure Arc for Servers: I am not able to ssh into all my azure arc servers

Nelson Nwajie 5 Reputation points
2025-05-19T15:47:24.33+00:00

az ssh arc --name <server name> --resource-group <resource group> is giving this error:

OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2

{"level":"error","msg":"error connecting to wss://azgn-canadacentral-public-1p-wusby-vr0001.servicebus.windows.net/$hc/microsoft.hybridcompute/machines/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxFsb-hc-action=connect\u0026sb-hc-id=5cfecbab-7bfb-413d-a123-e5a507447ce6. 404 Endpoint does not exist. TrackingId:5cfecbab-7bfb-413d-a123-e5a507447ce6_G3, SystemTracker:sb://azgn-canadacentral-public-1p-wusby-vr0001.servicebus.windows.net/microsoft.hybridcompute/machines/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/v2, Timestamp:2025-05-19T15:33:11. websocket: bad handshake ","proxyVersion":"1.3.026973"}

{"level":"fatal","msg":"sshproxy: error connecting to the address: 404 Endpoint does not exist. TrackingId:5cfecbab-xxxxxxxxxxxxxxxxxxxxxxxxxxx_G3, SystemTracker:sb://azgn-canadacentral-public-1p-wusby-vr0001.servicebus.windows.net/microsoft.hybridcompute/machines/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxx/v2, Timestamp:2025-05-19T15:33:11. websocket: bad handshake","proxyVersion":"1.3.026973"}

kex_exchange_identification: Connection closed by remote host

Connection closed by UNKNOWN port 65535

Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
525 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Vinod Pittala 4,175 Reputation points Microsoft External Staff Moderator
    2025-05-19T19:10:03.7266667+00:00

    Hello Nelson,

    The error messages you're encountering—particularly the "404 Endpoint does not exist"—indicate that the Azure Hybrid Compute service endpoint may be unreachable or misconfigured. This typically affects SSH connectivity to Azure Arc-enabled servers.

    Here are some steps you can take to troubleshoot this issue:

    1. Check the HybridConnectivity Resource Provider: Ensure that the HybridConnectivity resource provider is registered for your subscription. You can check this by running:
            az provider show -n Microsoft.HybridConnectivity -o tsv --query registrationState
      
      If it is not registered, you can register it using:
            az provider register -n Microsoft.HybridConnectivity
      
      You can refer to the below doc for better understanding: https://learn.microsoft.com/en-us/azure/azure-arc/servers/ssh-arc-troubleshoot?tabs=azure-cli#hybridconnectivity-rp-not-registered
    2. Validate the Connectivity Endpoint: Make sure that the default connectivity endpoint has been created correctly for your Azure Arc-enabled servers. You can validate this by running:
         az rest --method get --uri https://management.azure.com/subscriptions/<subscription>/resourceGroups/<resourcegroup>/providers/Microsoft.HybridCompute/machines/<arc enabled server name>/providers/Microsoft.HybridConnectivity/endpoints/default?api-version=2023-03-15
      
    3. Delete the existing service configuration and allow it to be re-created by the CLI command at the next connection. Run:
         az rest --method delete --uri https://management.azure.com/subscriptions/<SUB_ID>/resourceGroups/<RG_NAME>/providers/Microsoft.HybridCompute/machines/<VM_NAME>/providers/Microsoft.HybridConnectivity/endpoints/default/serviceconfigurations/SSH?api-version=2023-03-15
      
      Refer: https://learn.microsoft.com/en-us/azure/azure-arc/servers/ssh-arc-troubleshoot?tabs=azure-cli#cannot-connect-after-updating-cli-tool-and-arc-agent
    4. Check Permissions: Ensure that you have the Owner or Contributor role on the resource or contact the owner/contributor of the resource to set up SSH connectivity. If using Microsoft Entra login, ensure you have the Virtual Machine User Login or the Virtual Machine Administrator Login roles and that the Microsoft Entra SSH Login extension is installed on the Arc-Enabled Server.
    5. Review the SSH Configuration: Ensure that the SSH service (SSHD) is running on the Arc-enabled server and ensure that the functionality is enabled on your Arc-enabled server on port 22 (or other nondefault port).
         az rest --method put --uri https://management.azure.com/subscriptions/<subscription>/resourceGroups/<resourcegroup>/providers/Microsoft.HybridCompute/machines/<arc enabled server name>/providers/Microsoft.HybridConnectivity/endpoints/default/serviceconfigurations/SSH?api-version=2023-03-15 --body '{\"properties\": {\"serviceName\": \"SSH\", \"port\": 22}}'
      
    6. Restart the Hybrid Agent: If the above steps do not resolve the issue, try restarting the hybrid agent on the Arc-enabled server and try accessing the server.

    If the provided solution works for your query, please do not forget to click Upvote Button. this can be beneficial to other community members.it would be greatly appreciated and helpful to others

    Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.