Recently while deploying Windows Server 2008 R2 instances on VMware, I encountered a peculiar RDP behavior where connections would hang for 20-30 seconds at the "Securing Remote Connection" phase. Unlike typical network latency issues, this delay occurs before authentication and persists across failed login attempts.
Affected configuration:
Host: VMware ESXi 6.7
Guest OS: Windows Server 2008 R2 SP1 (fully patched)
RDP Client: Windows 7 Professional
Network: 1Gbps LAN
The temporary resolution after successful login suggests this might relate to credential caching or security negotiation. Let's examine the cryptographic components:
# Check RDP security settings via PowerShell:
Get-ItemProperty -Path "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp" -Name "SecurityLayer"
Packet captures revealed excessive time spent during TLS handshake. Try this Wireshark filter for diagnosis:
tls.handshake.type == 1 or tcp.port == 3389
The root cause appears to be certificate validation against an unavailable CRL (Certificate Revocation List). To verify:
# Check certificate store behavior:
certutil -urlcache * delete
certutil -setreg chain\\ChainCacheResyncFiletime @now
Two approaches worked consistently:
- Disable CRL checking (not recommended for production):
reg add "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WinTrust\\Trust Providers\\Software Publishing" /v State /t REG_DWORD /d 0x00023e00 /f
- Proper certificate management:
# Reissue terminal server certificate with proper CRL distribution points $cert = New-SelfSignedCertificate -DnsName $env:COMPUTERNAME -CertStoreLocation Cert:\LocalMachine\My Set-RDCertificate -Role RDGateway -ImportPath $cert.PSPath -Force
For VMware VMs, ensure VMXNET3 adapter with these settings:
ethernet0.virtualDev = "vmxnet3"
ethernet0.uptCompatibility = "TRUE"
monitor_control.restrict_backdoor = "TRUE"
For environments where certificate changes aren't possible, adjust the RDP security layer:
reg add "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp" /v SecurityLayer /t REG_DWORD /d 1 /f
This forces RDP to use native encryption rather than negotiating TLS.
Many administrators encounter this frustrating scenario: When establishing a Remote Desktop Protocol (RDP) connection to a Windows Server 2008 R2 instance (physical or virtual), the connection hangs at the "Securing Remote Connection" message for 20-30 seconds before proceeding. The delay occurs consistently for failed authentication attempts but improves after successful logins.
Common environmental factors reported with this issue include:
- VMware virtualization platforms (though not exclusively)
- Mixed Windows 7/Server 2008 R2 environments
- Networks with strict security policies
- Servers with multiple network interfaces
First, verify basic network functionality with these PowerShell commands:
# Check basic connectivity
Test-NetConnection -ComputerName SERVERNAME -Port 3389
# Trace route analysis
Test-NetConnection -ComputerName SERVERNAME -TraceRoute
# Check TLS handshake timing
$TCPClient = New-Object Net.Sockets.TcpClient
$StopWatch = [System.Diagnostics.Stopwatch]::StartNew()
$TCPClient.Connect('SERVERNAME', 3389)
$StopWatch.Stop()
Write-Output "Connection established in $($StopWatch.ElapsedMilliseconds)ms"
The delay often relates to certificate validation. Examine the RDP certificate with:
Get-ChildItem -Path Cert:\LocalMachine\Remote Desktop -Recurse |
Where-Object { $_.Subject -match "SERVERNAME" } |
Select-Object Subject, Thumbprint, NotBefore, NotAfter
Try these registry modifications on the client machine:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings]
"SecureProtocols"=dword:00000AA0
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
"SecurityLayer"=dword:00000001
"UserAuthentication"=dword:00000000
On the Windows 2008 R2 server, ensure proper TLS configuration:
# Disable legacy protocols
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server" -Name Enabled -Value 0 -PropertyType DWORD
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server" -Name Enabled -Value 0 -PropertyType DWORD
# Enable modern protocols
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server" -Name Enabled -Value 1 -PropertyType DWORD
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" -Name Enabled -Value 1 -PropertyType DWORD
For immediate relief while troubleshooting, consider:
mstsc /v:SERVERNAME /admin /f /public
Or create a customized RDP file with these parameters:
enablecredsspsupport:i:0
authentication level:i:2
negotiate security layer:i:1
When analyzing network traffic during the delay period, watch for:
- Multiple TLS handshake attempts
- CRL (Certificate Revocation List) check timeouts
- OCSP (Online Certificate Status Protocol) verification delays
- Network interface switching