How do I troubleshoot authentication errors when I use RDP to connect to an EC2 Windows instance?

Amazon Web Services · Beginner ·☁️ DevOps & Cloud ·1y ago

Key Takeaways

Troubleshoots authentication errors when using RDP to connect to an EC2 Windows instance

Full Transcript

Hello, I'm Special, a cloud support engineer at the AWS office in Auckland, New Zealand. Today, I'm going to show you how to troubleshoot network level authentication errors when you try to use Remote Desktop Protocol or RDP to connect to an EC2 Windows instance. Let's get started. When you try to use RDP to connect to your EC2 Windows instance, you might receive network level authentication or NLA errors such as an authentication error has occurred. The local security authority cannot be contacted. Or the remote computer that you are trying to connect to requires network level authentication, but your Windows domain controller cannot be contacted to perform NLA. This errors can occur because you turn on NLA for the server, which causes an instance to lose connectivity to a domain controller because the domain credentials aren't authenticated. The error can also occur because the trust relationship between your domain and the instance fails when you log in to RDP. First, I will show you how to turn off NLA for the server. Before you begin, make sure that you have the correct permissions to perform these actions. Also, please make sure you have taken an AMI or snapshot backup of the instance. This precaution is necessary in case we need to roll back to the previous stage. To turn off NLA on an unreachable instance that has Systems Manager managed, you can run the AWS Support Troubleshoot RDP Automation document, deactivate NLA with Session Manager capability of Systems Manager, run the AWS Run PowerShell script command document, or manually change the registry offline. To use the AWS Systems Manager AWS Support Troubleshoot RDP Automation document to deactivate NLA on the instance, first, open the Systems Manager console. In the navigation pane, choose documents. Search for the runbook name AWS Support Troubleshoot RDP. Choose AWS Support Troubleshoot RDP. And then, choose execute automation. In the input parameters, choose your managed instance. In the NLA setting action, select disable. Then, choose execute. Wait for the automation to successfully complete, and then RDP into the instance. Another way to turn off NLA is to use Session Manager to add registry keys. First, open the AWS Systems Manager console. In the navigation pane, choose Fleet Manager. Choose the managed instance that you want to connect to. In the node actions menu, choose start terminal section. This connects you to the instance using Session Manager. In the terminal, run these commands to turn off NLA. You can also use the AWS Run PowerShell script command document to turn off NLA. On the Systems Manager console, navigate to run command. Choose run command. Search for the command document name AWS Run PowerShell script. Select AWS Run PowerShell script. Next, in the command parameters, I will enter the same registry commands that I entered when I used Session Manager. Then, choose instance manually and select your instance. Choose run. Wait for the process to successfully complete, and then RDP into the instance. And finally, if you can't connect to your instance, then you can manually change the registry offline to turn off NLA. First, create an Amazon machine image or a snapshot as a backup. Then, stop the unreachable instance and detach the root volume. Launch a new instance in the same availability zone as the unreachable instance that you stopped. The new instance becomes your rescue instance. It's a best practice to launch a Windows instance that's different from the unreachable instance to avoid disk signature issues. Next, attach the detached volume to the rescue instance as dev xvdf. Use RDP to connect to the rescue instance, and then bring the attached volume online in Disk Manager. In the command prompt, enter regedit.exe, and then press enter to open the Registry Editor. Choose HKEY_LOCAL_MACHINE, and then choose file, load hive. Navigate to the Windows folder on the attached volume, and then select the system file. The default path is D Windows System32 config. Name the system file. For example, basis. The basis system file now appears under HKEY_LOCAL_MACHINE. Under basis, navigate to ControlSet001, then Control, then Terminal Server, WinStations, and finally, RDP-TCP. Double-click Security Layer and set the value data to zero. Choose User Authentication and set the value data to zero. Then, choose fAllowSecProtocolNegotiation and set the value data to zero. Choose basis, file, unload hive. After the hive unloads, open Disk Manager and take the disk offline. Detach the volume from the rescue instance, and attach the volume to the unreachable instance as the root volume. Finally, start the instance and test your RDP connection. If NLA is set by group policy, then these steps might not work. You will also need to turn off NLA in group policy. Now, let me show you how to resolve the failure that happens in the trust relationship between your domain and the instance when you log in to RDP. To resolve this issue, use cached user credentials to try to log in to the unreachable instance. Before you begin, make sure that you have a local account that can successfully authenticate to the instance. Also, when the domain controller isn't available, make sure to set the number of previous logins to cache to at least one. You must set this value to use interactive logins. You can set the policy to the default value of 10. By default, the policy isn't defined, and you can use the server's local policy. To use cached user credentials, first, open the EC2 console. Create a new security group with RDP inbound access, but no outbound access. Assign the new security group to your instance. Use a regular domain account to RDP into the instance. Because there's no outbound access, RDP uses cached credentials on the server to authenticate. After you connect, you can change the security group back to its original settings. So, now you know how to troubleshoot NLA errors when you try to use RDP to connect to a Windows instance. Thanks for watching and happy cloud computing from all of us here at AWS.

Original Description

For more details on this topic, visit the AWS Knowledge Center on AWS re:Post and read the full article associated with this video: https://repost.aws/knowledge-center/ec2-windows-rdp-authentication-errors The AWS Knowledge Center contains trusted, expert-reviewed answers to frequently asked questions across AWS services — including EC2, S3, IAM, Lambda, Bedrock, and more. Special shows you how to troubleshoot authentication errors when I use RDP to connect to an EC2 Windows instance. 0:00 Introduction 1:25 How to turn off NLA for the server 3:21 Use Session Manager to turn off NLA 4:01 PowerShellScript to turn off NLA 10:06 Closing Subscribe: More AWS videos: https://go.aws/3m5yEMW More AWS events videos: https://go.aws/3ZHq4BK Do you have technical AWS questions? Ask the community of experts on AWS re:Post: https://go.aws/3lPaoPb ABOUT AWS Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform, offering over 200 fully featured services from data centers globally. Millions of customers — including the fastest-growing startups, largest enterprises, and leading government agencies — are using AWS to lower costs, become more agile, and innovate faster. #AWS #AmazonWebServices #CloudComputing #awsknowledgecentervideos #AWSCloud #AmazonAWS #KnowledgeCenterVideos #AWSrePost
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Amazon Web Services · Amazon Web Services · 41 of 60

1 Agentic AI Design Patterns Introduction and walkthrough | Amazon Web Services
Agentic AI Design Patterns Introduction and walkthrough | Amazon Web Services
Amazon Web Services
2 Galileo on modernizing on banking infrastructure | Amazon Web Services
Galileo on modernizing on banking infrastructure | Amazon Web Services
Amazon Web Services
3 Alliander Speeds Innovation and Energy Transition Using AWS | Amazon Web Services
Alliander Speeds Innovation and Energy Transition Using AWS | Amazon Web Services
Amazon Web Services
4 AWS and Scuderia Ferrari HP streamline F1 power unit assembly | Amazon Web Services
AWS and Scuderia Ferrari HP streamline F1 power unit assembly | Amazon Web Services
Amazon Web Services
5 How AWS machine learning supports Scuderia Ferrari HP pit stops | Amazon Web Services
How AWS machine learning supports Scuderia Ferrari HP pit stops | Amazon Web Services
Amazon Web Services
6 Nasdaq Builds Market Infrastructure of the Future with AWS | Amazon Web Services
Nasdaq Builds Market Infrastructure of the Future with AWS | Amazon Web Services
Amazon Web Services
7 AWS Security Hub Exposure Findings | Amazon Web Services
AWS Security Hub Exposure Findings | Amazon Web Services
Amazon Web Services
8 How do I use Session Manager port forwarding to connect to my EC2 instance through RDP?
How do I use Session Manager port forwarding to connect to my EC2 instance through RDP?
Amazon Web Services
9 How do I extend an EBS volume with LVM partitions?
How do I extend an EBS volume with LVM partitions?
Amazon Web Services
10 AWS Graviton makes it easy to optimize performance, cost, and sustainability | Amazon Web Services
AWS Graviton makes it easy to optimize performance, cost, and sustainability | Amazon Web Services
Amazon Web Services
11 Run Cloud Adoption Framework workshops with Miro | Amazon Web Services
Run Cloud Adoption Framework workshops with Miro | Amazon Web Services
Amazon Web Services
12 Getting Started with AWS Cost Optimization Hub | Amazon Web Services
Getting Started with AWS Cost Optimization Hub | Amazon Web Services
Amazon Web Services
13 Why did my Amazon SQS messages get sent to a dead-letter queue?
Why did my Amazon SQS messages get sent to a dead-letter queue?
Amazon Web Services
14 Declarative Policies for EC2 | Amazon Web Services
Declarative Policies for EC2 | Amazon Web Services
Amazon Web Services
15 How do I troubleshoot IAM permission issues for the Billing and Cost Management console?
How do I troubleshoot IAM permission issues for the Billing and Cost Management console?
Amazon Web Services
16 Integrity at Scale: Inside the Flo Health Mission | Amazon Web Services
Integrity at Scale: Inside the Flo Health Mission | Amazon Web Services
Amazon Web Services
17 Fueling Success: Small shifts, powerful performance | Amazon Web Services
Fueling Success: Small shifts, powerful performance | Amazon Web Services
Amazon Web Services
18 WEX enhances customer experience with AI-powered chatbot | Amazon Web Services
WEX enhances customer experience with AI-powered chatbot | Amazon Web Services
Amazon Web Services
19 Accelerate troubleshooting with Amazon CloudWatch investigations | Amazon Web Services
Accelerate troubleshooting with Amazon CloudWatch investigations | Amazon Web Services
Amazon Web Services
20 Why is my Windows WorkSpace stuck in the starting, rebooting, or stopping status?
Why is my Windows WorkSpace stuck in the starting, rebooting, or stopping status?
Amazon Web Services
21 Telemetry Pipelines for AI | Amazon Web Services
Telemetry Pipelines for AI | Amazon Web Services
Amazon Web Services
22 Getting Control over Security and Observability Data | Amazon Web Services
Getting Control over Security and Observability Data | Amazon Web Services
Amazon Web Services
23 The Problem with Telemetry Data Volume | Amazon Web Services
The Problem with Telemetry Data Volume | Amazon Web Services
Amazon Web Services
24 Telemetry Pipelines on AWS | Amazon Web Services
Telemetry Pipelines on AWS | Amazon Web Services
Amazon Web Services
25 What are Telemetry Pipelines? | Amazon Web Services
What are Telemetry Pipelines? | Amazon Web Services
Amazon Web Services
26 Using AI for RegEx on Telemetry Pipelines | Amazon Web Services
Using AI for RegEx on Telemetry Pipelines | Amazon Web Services
Amazon Web Services
27 Multi-Session Support in the AWS Console | Amazon Web Services
Multi-Session Support in the AWS Console | Amazon Web Services
Amazon Web Services
28 How CloudHedge delivers assessment with AWS ISV Tooling Program at no cost?
How CloudHedge delivers assessment with AWS ISV Tooling Program at no cost?
Amazon Web Services
29 How customers speed up migration and modernization to AWS with CloudHedge | Amazon Web Services
How customers speed up migration and modernization to AWS with CloudHedge | Amazon Web Services
Amazon Web Services
30 Chaos Experiment with Amazon ElastiCache | Amazon Web Services
Chaos Experiment with Amazon ElastiCache | Amazon Web Services
Amazon Web Services
31 Amazon S3 Access Points: Easily manage access for shared datasets on S3 | Amazon Web Services
Amazon S3 Access Points: Easily manage access for shared datasets on S3 | Amazon Web Services
Amazon Web Services
32 ElastiCache Valkey 8.0 - Savings and Efficiency | Amazon Web Services
ElastiCache Valkey 8.0 - Savings and Efficiency | Amazon Web Services
Amazon Web Services
33 Pennymac scales document processing with AWS | Amazon Web Services
Pennymac scales document processing with AWS | Amazon Web Services
Amazon Web Services
34 AWS | Next Level Innovation | Amazon Web Services
AWS | Next Level Innovation | Amazon Web Services
Amazon Web Services
35 Driving Cloud Innovation: Mindtickle's Partnership with AWS Enterprise Support | Amazon Web Services
Driving Cloud Innovation: Mindtickle's Partnership with AWS Enterprise Support | Amazon Web Services
Amazon Web Services
36 A Leader's Edge from Executive Insights | Amazon Web Services
A Leader's Edge from Executive Insights | Amazon Web Services
Amazon Web Services
37 How do I create a custom Amazon WorkSpaces image?
How do I create a custom Amazon WorkSpaces image?
Amazon Web Services
38 Charles Leclerc tests his AI-generated race track | Amazon Web Services
Charles Leclerc tests his AI-generated race track | Amazon Web Services
Amazon Web Services
39 Redington Scales India’s Cloud Access with AWS Partnership | Amazon Web Services
Redington Scales India’s Cloud Access with AWS Partnership | Amazon Web Services
Amazon Web Services
40 How do I prevent the resources in my CloudFormation stack from getting deleted or updated?
How do I prevent the resources in my CloudFormation stack from getting deleted or updated?
Amazon Web Services
How do I troubleshoot authentication errors when I use RDP to connect to an EC2 Windows instance?
How do I troubleshoot authentication errors when I use RDP to connect to an EC2 Windows instance?
Amazon Web Services
42 Exploring the Possibilities of Digital Twin & AI at the Edge | Amazon Web Services
Exploring the Possibilities of Digital Twin & AI at the Edge | Amazon Web Services
Amazon Web Services
43 Exploring the Possibilities of Digital Twin & AI at the Edge | Amazon Web Services
Exploring the Possibilities of Digital Twin & AI at the Edge | Amazon Web Services
Amazon Web Services
44 AWS at the FORMULA 1 AWS GRAN PREMIO DELL'EMILIA-ROMAGNA 2025 | Amazon Web Services
AWS at the FORMULA 1 AWS GRAN PREMIO DELL'EMILIA-ROMAGNA 2025 | Amazon Web Services
Amazon Web Services
45 What's new in RCPs | Amazon Web Services
What's new in RCPs | Amazon Web Services
Amazon Web Services
46 API Caching using Amazon ElastiCache | Amazon Web Services
API Caching using Amazon ElastiCache | Amazon Web Services
Amazon Web Services
47 Pendula: Amazon Nova Customer Testimonial | Amazon Web Services
Pendula: Amazon Nova Customer Testimonial | Amazon Web Services
Amazon Web Services
48 InDebted : Amazon Nova Customer Testimonial | Amazon Web Services
InDebted : Amazon Nova Customer Testimonial | Amazon Web Services
Amazon Web Services
49 Amazon DynamoDB global tables with multi-Region strong consistency | Amazon Web Services
Amazon DynamoDB global tables with multi-Region strong consistency | Amazon Web Services
Amazon Web Services
50 Siemens Mobility uses AWS to operate securely, efficiently on a global scale | Amazon Web Services
Siemens Mobility uses AWS to operate securely, efficiently on a global scale | Amazon Web Services
Amazon Web Services
51 How do I reuse a knowledge base session in Amazon Bedrock?
How do I reuse a knowledge base session in Amazon Bedrock?
Amazon Web Services
52 EP5: MBZUAI, CMU : Causal AI, Answering The “Why“ and “What if“ Questions | AWS for AI Podcast
EP5: MBZUAI, CMU : Causal AI, Answering The “Why“ and “What if“ Questions | AWS for AI Podcast
Amazon Web Services
53 Hema scales time to market developing a data mesh on AWS (Technical) - Cloud Adventures
Hema scales time to market developing a data mesh on AWS (Technical) - Cloud Adventures
Amazon Web Services
54 Hema scales time to market developing a data mesh on AWS (Business) - Cloud Adventures
Hema scales time to market developing a data mesh on AWS (Business) - Cloud Adventures
Amazon Web Services
55 How Langfuse Scaled Their AI Platform with AWS: From Open-Source to Enterprise | Amazon Web Services
How Langfuse Scaled Their AI Platform with AWS: From Open-Source to Enterprise | Amazon Web Services
Amazon Web Services
56 SLMs and LLMs: What’s the Difference? | Amazon Web Services
SLMs and LLMs: What’s the Difference? | Amazon Web Services
Amazon Web Services
57 SLMs and LLMs: When to use them? | Amazon Web Services
SLMs and LLMs: When to use them? | Amazon Web Services
Amazon Web Services
58 SLMs on CPU | Amazon Web Services
SLMs on CPU | Amazon Web Services
Amazon Web Services
59 Intelligent Model Routing | Amazon Web Services
Intelligent Model Routing | Amazon Web Services
Amazon Web Services
60 SLMs, LLMs, and Model Routing in Agents | Amazon Web Services
SLMs, LLMs, and Model Routing in Agents | Amazon Web Services
Amazon Web Services

Related Reads

Chapters (5)

Introduction
1:25 How to turn off NLA for the server
3:21 Use Session Manager to turn off NLA
4:01 PowerShellScript to turn off NLA
10:06 Closing
Up next
Containers on Amazon ECS with Mama J
AWS Developers
Watch →