Creating And Access Windows Instance

we'll walk you through the steps to create a Windows EC2 instance on AWS and show you how to access it from both a Windows and a Linux machine.

  • Once you're logged in, navigate to the EC2 service by clicking on "Services" and selecting "EC2" under the "Compute" section.
  • Launch a Windows Instance
  • In the EC2 Dashboard, click the Launch Instance button.
  • Choose an Amazon Machine Image (AMI):
  • Select a Windows AMI (e.g., Windows Server 2019).
  • Choose an Instance Type:
  • Select the instance type based on your requirements.
  • Configure Instance Details:
  • Configure network settings and advanced settings as needed.
  • Specify the storage volume size for your instance.
  • Add Tags (Optional), for better organization.
  • Configure security group rules to allow RDP traffic (port 3389).
  • Create a new key pair or choose an existing one. You'll need this to access your instance securely.
  • Launch Instances:

Follow the Below Steps to Retrieve Windows Password

  1. Open the Amazon EC2 console and go to the Instances page.
  2. This means you need to log in to the Amazon EC2 service and find the page where all your virtual machines (called instances) are listed.
  3. Select your instance by checking the box next to it, and then find the Actions menu. In the old version of the console, choose Get Windows Password. In the new version, go to Security and then select Get Windows Password.
  4. Once you've found the right menu, you'll see an option to get the password for your Windows instance. It might not be available right away if you just created the instance; you might need to wait a bit.
  5. To get the password, you can either browse and select a special file you have or paste some text.
  6. You have two choices here. You can either find a special file on your computer (a key pair file) and select it, or you can copy and paste some text.
  7. Finally, click the button that says Decrypt Password.
  8. After you've chosen your key pair file or pasted the text, this button will reveal the password for your Windows instance. You'll need this password to log in to your instance.

Accessing the Windows EC2 Instance from a Windows Machine

  1. In the EC2 Dashboard, locate your Windows EC2 instance and note down its IPv4 Public IP.
  2. Open the Remote Desktop Connection application on your Windows computer.
  3. Enter the Public IP of your Windows EC2 instance.
  4. Click Connect.
  5. Enter the username and password for your Windows instance when prompted.
  6. You are now connected to your Windows EC2 instance from your Windows machine.

Accessing the Windows EC2 Instance from a Linux Machine

To connect to a Windows EC2 instance from a Linux machine, you can use a remote desktop client called Remmina or rdesktop, both of which support Remote Desktop Protocol (RDP).

Here are the steps to connect to your Windows EC2 instance from a Linux computer:

  • If you don't have Remmina installed, you can install it using your Linux distribution's package manager. For example, if you're using Ubuntu, you can use the following command:
sudo apt-get install remmina
  • In your AWS EC2 dashboard, locate your Windows EC2 instance and note down its IPv4 Public IP or Public DNS. You will need this address to connect to your Windows instance.
  • Open the Remmina application from your Linux desktop environment
  • Click on New to create a new connection profile.
  • In the Basic tab:Set the Name to a descriptive name for your connection.
  • Set the Protocol to RDP.
  • Enter the Server as the Public IP or Public DNS of your Windows EC2 instance.
  • In the Advanced tab:You can customize various settings as needed, such as screen resolution, colors, and more.
  • Click Save to save the connection profile.
  • Connect to Your Windows EC2 Instance
  • Select the connection profile you just created from the Remmina main window.
  • Click Connect.
  • Enter your Windows EC2 instance's username and password when prompted.

For rdesktop (in the terminal):

rdesktop -u username -p password -g 1280x720 <your-instance-ip>

Replace username with your Windows instance's username, password with your instance's password, and adjust the screen resolution (-g) as needed.