Autofill RDP with LastPass

Disclaimer

I am working for LastPass as a Solution Consultant. This blog and all its contents are not official LastPass content. They are solely created by me in my private time.

With this post I am posting my first real Tutorial on how to do something in another software. I hope you find it beneficial.

One question that is asked a lot during my work and also in the internet is, how to start Remote Desktop Sessions directly from LastPass. This is due to the fact that LastPass often is only seen as Browser extension and also has no native integration with Remote Desktop. Instead customers often use tools like RemoteDesktopManager, which have integrations into LastPass to retrieve the credentials.

But it is possible to start RDP sessions from LastPass – just not from the Browser extension, only from the Windows Desktop Application. See the video for how it works:

LastPass can only fill out forms of local applications. Therefor LastPass cannot directly auto-fill a Remote Desktop session as the credentials are queried on the remote machine. By using the trick of creating a Remote Desktop session from a Command Prompt, parameters like username, password or IP address can be pushed through from LastPass.

To make this integration work, the following fields have to be filled:

Name: Whatever name you like
Folder: A folder of choice
Application Title: "Remote Desktop Application"
Username: <your username>
Password <your password>
Application Fill sequence: -blank-
Application Path: C:\Windows\System32\cmd.exe
Command Line Arguments: ​​​​​/c "cmdkey /generic:TERMSRV/[EnterServerNameOrIPHere] /user:{USERNAME} /pass:{PASSWORD} && mstsc /v:[EnterServerNameOrIPHere] && timeout /t 5 /nobreak && cmdkey /delete:TERMSRV[EnterServerNameOrIPHere]"

Replace the two [EnterServerNameOrIPHere] with the IP address of the remote server and save the entry. See an example below:

Have fun re-creating this setup and storing all your Remote Desktop Sessions safely in LastPass. If you have questions or comments, please drop a note in the comments section below.

If you liked the article, then spread the word and share it with your friends

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close