SSL certificate CN does not match the hostname

While connecting to Azure VM, you may get the following connection fail error..

"Connecting to remote server site.cloudapp.net failed with the following error message :

The server certificate on the destination computer (site.cloudapp.net:5986) has the following errors:  The SSL certificate contains a common name (CN) that does not match the hostname. For more information, see the about_Remote_Troubleshooting Help topic."

This error is a result of inappropriate SSL certificate being imported into your local SSL Store. One way to avoid this error is to switch off SSL check upon connecting to Azure. PowerShell command is show below for this purpose.

$sessionsOption= New-PSSessionOption -SkipCNCheck

New-PSSession 10.0.0.4 -Port 5000 -Credential domain\user-name -UseSSL -SessionOption $sessionOption

Featured pages

Services

Windows Azure has several services available for use when you first sign up with Azure. Some of the…

PowerShell

Azure PowerShell scripts are integral part of Microsoft Azure environment. It is designed to help A…

Errors

Azure Cloud Services are very information when it comes to producing error messages. Some of the co…

Pricing

Windows Azure has difference services and pricing normally calculated via Online Azure Pricing Calc…