Summary
In this post, I'll discuss how to set up a remote desktop session from an Ubuntu client to Windows 2016 Server.
Implementation
Windows-side Configuration
Open up Server Manager, Local Server.
Click on Remote Desktop. It will be 'Disabled' on Windows 2016 Standard. With 2016 Essentials, it's enabled by default.
Choose the 'Allow remote connections to this computer' radio button. Leave the 'Allow connections only...Network Level Authentication' checkbox selected. More on that later. The Administrator will be allowed Remote Desktop access by default. If you want to add other users, go through the 'Select Users' dialog.
Close this window via the 'OK' button. Remote Desktop will now show 'Enabled' (may require a screen refresh). Additionally, Windows will automatically open up the necessary ports through its firewall to enable access to Remote Desktop.
Ubuntu-side Configuration
rdesktop
rdesktop is a commonly-used RDP client on Ubuntu. It doesn't appear that development of rdesktop has kept up with the times. In particular, rdesktop does not support the current authorization protocols within Windows - specifically, Network Level Authentication. That 'Allow...Network Level Authentication' checkbox mentioned above enables NLA.
Below is an example rdesktop command to initiate a Remote Desktop session:
rdesktop -g 1152x864 -r clipboard:CLIPBOARD -r sound:off -x l -P 1.2.3.4 -u "yourusername" -p yourpasswordIf NLA is turned up on the Windows server, you'll get this error:
ERROR: CredSSP: Initialize failed, do you have correct kerberos tgt initialized ? Failed to connect, CredSSP required by server.If you're determined to use rdesktop, the simplest fix is to uncheck NLA box on the Windows server. It will work after that, albeit with less security for the RDP connections.
freerdp
An alternative to rdesktop is FreeRDP. It does support NLA. You can either install it directly from the freerdp github site or simply install the version that's in the Ubuntu repositories - xfreerdp
sudo apt-get install freerdp-x11Below is a sample command line that will set up a Remote Desktop session to Windows 2016, with NLA enabled:
xfreerdp /v:1.2.3.4 /u:yourusername /p:yourpassword +clipboard /size:1152x864Creating a command launcher on the Ubuntu desktop for remote desktop can be accomplished with the command below:
gnome-desktop-item-edit --create-new ~/DesktopThis will launch a dialog window:
Copy/paste the xfreerdp command into the 'Command:' text box.
Copyright ©1993-2024 Joey E Whelan, All rights reserved.