How to save the xrdp login details for passwordless authentication

H

XRDP brings the Remote Desktop protocol (RDP) to linux machines. One of the main drawbacks is that it does not support network layer authentication (NLA), therefore Windows won’t allow you to save the password and it does not allow you to copy and paste the password in the login screen.

Thankfully, there is a solution which implies the creation of a .rdp file with the login credentials. It acts as a simple shortcut, one click on it and you’re directly logged into your remote linux server.

Start a powershell terminal:

Run the following command in the powershell terminal:

(Read-Host 'Enter Your RDP Password:' -AsSecureString) | ConvertFrom-SecureString;

You’ll be asked to enter the RDP password. Enter it and press enter.

Copy the generated code (the one just below your *****), open a notepad or any other text editor and complete it like this:

full address:s:SERVER-IP
username:s:SERVER-USERNAME
password 51:b:GENERATED-PASSWORD

The

The GENERATED-PASSWORD should be the generated code which you copied from the powershell window.
The SERVER-USERNAME should the username you will use to login. In the case of MVPS servers, this will be: root
The SERVER-IP is the server’s IP address.

For example, your file should look like this:

full address:s:123.123.132
username:s:root
password 51:b:01000000d08c9ddf011118c7a00c04…51f16f63a65fb6e8d7730039f6df2b894f3393130293158f8137c

Save the file as myserver.rdp and then click on it. You should be connected to your server without being asked for the password.

It should be noted that this file will only work on the computer where it was generated. You won’t be able to send it to someone else or copy it on another computer. You’ll need to generate a new one for each computer.

Last but not least, make sure you use a very strong password for your server. If you do not use ssh, disable it!
Create another user for your daily use, enable sudo and disable root access.

About the author

By mvps

Recent Posts

Archives

Categories