+++
title = "Connecting to Windows Instances"
description = "How to connect to Windows-based instances"
+++

{{% notice info %}}
This guide assumes you associated your SSH Key Pair with the instance
when it was created, and that you are connected to the [Anvil VPN]({{< relref "connecting_to_the_anvil_vpn" >}}).
{{% /notice %}}

Access to Windows instances is provided via Remote Desktop (RDP).  When
the Windows instance is created, the password is set randomly using your
SSH Key Pair.  This password can be retrieved via the Dashboard web
interface, and then is used to login via Remote Desktop. 

Once your instance is running, login to the Anvil web dashboard
at https://anvil.unl.edu and click the *Instances* menu option on left-hand side.
You should see an entry for your instance similar to the following:

{{< figure src="/images/13042887.png" width="900" >}}

Click the down arrow next to *Create Snapshot* to open the drop-down
menu and select *Retrieve Password*:

{{< figure src="/images/13042846.png" height="400" >}}

This will open a new pop-up window where you will need to select
your **private** SSH key file.  Click the *Choose File* button to open a
file explorer window.  

{{% notice warning %}}
Due to the size of the image and other factors, it may take several
minutes for a Windows instance to complete setup and be accessible. It
is recommended to wait **15-30 minutes** after the *Status* field shows
*Active* before trying to connect.{{% /notice %}}

{{< figure src="/images/13042857.png" width="600">}}

Navigate to your private key file and choose to open the file.  The
large text box should now have the contents of your private key.  Click
the *Decrypt Password* button: 

{{< figure src="/images/13042860.png" width="600" >}}

The randomly generate password should appear in the *Password* field.

{{< figure src="/images/13042862.png" width="600" >}}

Copy and paste this password into a convenient text editor.

Next, start your Remote Desktop client.  If you are using Windows, you
will already have the Windows-provided client program installed. For
Mac users, there is a free [Microsoft client](https://itunes.apple.com/us/app/microsoft-remote-desktop/id714464092?mt=8")
in the app store.

{{% notice info %}}
Older Remote Desktop clients may have problems connecting to Windows 10
instances due to changes in the security protocols for Remote Desktop.
Be sure to use an up-to-date client program when connecting to Windows
10 instances.
{{% /notice %}}

Determine the IP address of your instance by looking at the fourth
column entry on the *Instances* page:

{{< figure src="/images/13042890.png" width="900" >}}

Start your Remote Desktop client, enter the IP address in the name (or
address) field, and click "Connect":

{{< figure src="/images/Anvil-win10RDPClient.png" >}}

When prompted, enter **.\\cloud-user** for the username when connecting to a Windows 10
instance, and the previously recovered password.

{{% notice info %}}
For Windows 10, the username used to connect is always `.\cloud-user`
{{% /notice %}}

You may see a warning box about the certificate of the remote computer.
To avoid this warning in the future, check the box that says "Don't ask
me again for connections to this computer".

{{< figure src="/images/Anvil-win10RDPCert.png" height="400" >}}

Click "Yes" to continue connecting.  The Remote Desktop session should
then start and you will be connected to your instance.