Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.


I've now tried the following which gives me an error.

oshirowanen@desktop:~$ sudo xfreerdp /v:farm.company.com /d:company.com /u:username /g:gateway.company.com
transport_connect: getaddrinfo (Name or service not known)
Error: protocol security negotiation failure

Anyone know why I get this error?


From a windows machine, I can log into an rdp session simply by starting mstsc, entering in the gateway details and then entering in the computer details

gateway = gateway.company.com
computer = farm.company.com
user = domain\username

Can I do this with Linux? I have downloaded and installed Gnome's Remote Desktop Viewer application, and I can't see a gateway option. I can only see a host option and a user option.

share|improve this question
Related: unix.stackexchange.com/questions/78653/… –  slm Jan 31 at 16:16
Are you trying to RDP to a windows machine from a Linux box? –  slm Jan 31 at 20:02
@slm, that's right. My question doesn't make that clear does it? –  oshirowanen Jan 31 at 20:23
@slm, I am basically after rdp client software which has a terminal services gateway option when connecting to an rdp windows session I guess. –  oshirowanen Jan 31 at 20:36
OK, then see my updates, I completely misunderstood what you were asking. –  slm Jan 31 at 20:37

1 Answer 1

up vote 1 down vote accepted

1. Windows RDP client ⇢ Linux RDP server

From your question it isn't clear whether you're attempting to RDP into a Linux system or a Windows system. If it's a Linux system you're ultimately trying to RDP into then you'll need special software to enable RDP clients to connect to a Linux system via RDP.

There is a project called XRDP that you can install on a Linux system which allows for any RDP clients to connect to the box. The setup of this software can be a little tricky but it works well.

XRDP is basically a frontend that wraps VNC, so you're talking to the Linux system like so:

(Windows Desktop) ---> MSTSC ---> XRDP ---> VNC ---> (Linux Desktop)

2. Linux RDP client ⇢ Windows RDP server

If on the other hand you're attempting to RDP into a Windows system using a Linux RDP client then the only one I'm familiar with that has the ability to go through a TS (Terminal Server) Gateway is xfreerdp, the feature is specifically mentioned here and was only added recently in Nov. 2013.

$ xfreerdp /v:CLUSTER /d:DOMAIN /u:USER /p:PASSWD \
       /g:GATEWAY/gd:DOMAIN /gu:USER /gp:PASSWD 

This is a newly added feature that is currently being worked on so I'd doubt that it would be available in your distro's repositories as of yet. So you'll have to download the latest from the project's Github repository and build it from source.

share|improve this answer
Is that the only option? Looks complex. How about Remmina? Would that allow me to connect via a gateway? –  oshirowanen Jan 31 at 16:14
@oshirowanen - I've been looking for solutions to this problem for several years, that was the only one that gave RDP access to a Linux system that I found. It is complicated but it does work, and is pretty performant. –  slm Jan 31 at 16:15
@oshirowanen - Remmina is just a RDP/VNC client, not a server, so you need something on the server that will reply to RDP connections, hence XRDP. –  slm Jan 31 at 16:21
@oshirowanen - If you're using Debian/Ubuntu this script might make thing go easier, scarygliders.net/tag/x11rdp –  slm Jan 31 at 16:25
Sorry about this next noob question. Why would I need to setup a server? the gateway.company.com and the farm.company.com are already setup and running. Don't I just need client software to connect to the gateway inorder to connect to the rdp server? –  oshirowanen Jan 31 at 17:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.