Go back

Connect RDP with key based authentication

This section covers how to enable key based authentication for RDP session for Desktop Linux Ubuntu 24.04.

  1. To enable key-based authentication and provide an extra layer of security for our RDP session, we can use SSH tunneling and set up port forwarding on the localhost.

  2. Once your instance is up and running, open the command prompt on your local machine and run the command below. Make any necessary changes as applicable.

ssh -i path/to/your/key.pem -L 3390:localhost:3389 ubuntu@vm_ipaddress

provide the path to your key.pem file which you used during the vm deployment. It will ask you for confirmation. Enter yes here.

/img/aws/desktop-linux-ubuntu2404/ssh-tunnel.png

  1. This will start the tunneling and port will be forwarded to your localhost:3390. Once you are successfully connected to your instance after running the above command, Now open your RDP client from windows machine.

  2. In your RDP client enter the localhost:3390 instead of the public IP of the VM and click connect

/img/aws/desktop-linux-ubuntu2404/rdp-with-localhost.png

  1. Provide the username as ubuntu and password of ubuntu user.

/img/aws/desktop-linux-ubuntu2404/rdp-login.png

  1. You should be able to login successfully with localhost:3390.

/img/aws/desktop-linux-ubuntu2404/rdp-desktop-localhost.png

Go back