// Module included in the following assemblies:
//
// * support/troubleshooting/troubleshooting-windows-container-workload-issues.adoc
// * windows_containers/windows-containers-troubleshooting.adoc

:_mod-docs-content-type: PROCEDURE
[id="accessing-windows-node-using-rdp_{context}"]
= Accessing a Windows node using RDP

[role="_abstract"]
You can access a Windows node by using a Remote Desktop Protocol (RDP).

.Prerequisites

* You installed the Windows Machine Config Operator (WMCO) using Operator Lifecycle Manager (OLM).
* You have created a Windows compute machine set.
* You have added the key used in the `cloud-private-key` secret and the key used when creating the cluster to the ssh-agent. For security reasons, remember to remove the keys from the ssh-agent after use.
* You have connected to the Windows node link:https://access.redhat.com/solutions/4073041[using an `ssh-bastion` pod].

.Procedure

. Run the following command to set up an SSH tunnel:
+
[source,terminal]
----
$ ssh -L 2020:<windows_node_internal_ip>:3389 \
    core@$(oc get service --all-namespaces -l run=ssh-bastion -o go-template="{{ with (index (index .items 0).status.loadBalancer.ingress 0) }}{{ or .hostname .ip }}{{end}}")
----
+
where:

`<windows_node_internal_ip>`:: Specifies the internal IP address of the node, which can be discovered by running the following command:
+
[source,terminal]
----
$ oc get nodes <node_name> -o jsonpath={.status.addresses[?\(@.type==\"InternalIP\"\)].address}
----

. From within the resulting shell, SSH into the Windows node and run the following command to create a password for the user:
+
[source,terminal]
----
C:\> net user <username> *
----
+
Specify the cloud provider user name, such as `Administrator` for AWS or `capi` for Azure. You can now remotely access the Windows node at `localhost:2020` using an RDP client.
