56

Until sometime last night, I had remmina working fine. I could run RDP through an SSH tunnel and all was well.

Then it stopped working. I can get as far as the password dialog for my work machine, but then it just says Cannot connect to RDP server localhost.

I can't even find any logs that look interesting. I've re-installed remmina, cleared my .remmina directory, restarted my machine, and even restarted my gateway.

Just to make it really weird, my laptop (which has the same setup -- latest Ubuntu and Remmina) can make the connection just fine. It is even going through the same router, albeit wirelessly.

Any thoughts?

tomodachi
  • 14,542
  • 4
  • 31
  • 50
Chris Curvey
  • 1,603
  • 1
  • 11
  • 15

19 Answers19

72

I have no idea why it worked, but I started changing settings one at a time. When I edited the connection properties, I looked on the "advanced" tab and changed the security from "negotiate" to "TLS", and voila, everything works.

Strangely, "negotiate" still works on the laptop, but at least I'm back in business with my bigger monitor :)

Chris Curvey
  • 1,603
  • 1
  • 11
  • 15
46

This just happened to me, and I found this Stack Overflow answer by Alejandro Sanchez (archived), which resolved the issue. Just run rm ~/.freerdp/known_hosts and try again.

Apparently this happens when the keys on the tunnel server change. See Launchpad Bug #944040: Cannot connect to RDP if host fingerprint changes.

Update

The first link now points to an answer that was deleted and may not be archived completely. Here's some of the additional info from that link:

  • It seems that the "known_hosts" file contains some routing data for each server, that data becomes outdated sometimes, and when Remmina tries to connect using the outdated data, it fails. Deleting the known_hosts file solves this problem. – Erel Segal-Halevi Dec 13 '12 at 10:06

  • FWIW, my problem had nothing to do with known_hosts (as explained bellow), but everything to do with security settings: see http://www.bauer-power.net/2013/10/unable-to-connect-to-rdp-server-in.html for details. – Tomislav Nakic-Alfirevic Apr 24 '14 at 10:58

  • Totally worked, I was wondering where the certs were being stored. I had same issue for most part, was using Remmina to RDP to a certain machine, then one day it stopped working (nothing on the remote machine changed). Other RDP connections I had saved still worked, except for this one machine. It did happen to use NLA auth, which seems to be part of the problem with the newest Remmina not saving certs. – Nicholi Apr 26 '13 at 20:26

  • thanks , it used to connect perfectly then i reformatted the server and it stopped working , deleting the line for this host worked . – Bor691 Jan 15 '14 at 8:50

  • I need to use two services on same address but different ports and using this repeatedly is the only way I could connect to both. – Gringo Suave Oct 13 '14 at 18:55

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
itsadok
  • 2,894
  • 4
  • 28
  • 28
  • It was sugested to add `sudo` in front of the `rm` command. As far as I see, the user removes his own file, so `sudo` just ads risk. Am I missing something? – Volker Siegel Jun 24 '15 at 07:24
  • I understand this is an old question and answer. One of the reason I never ever post an external link as answer or in a question is because after something that link could be DEAD like in this case. When that happens, answer could become useless. I am just pointing out the obvious or Stackoverflow should prevent users of this website posting external links. – ThN May 03 '16 at 01:16
  • 10
    FYI, the file in question appears to now be at ~/.config/freerdp/known_hosts - at least it is on my system (Linux Mint 18.1). There is also a ~/.config/freerdp/known_hosts2 which had additional information in it that might be more up-to-date. Remmina 1.20. – Chris Hillery Apr 28 '17 at 21:24
  • 2
    Or the location might be at ~/snap/remmina/current/.config/freerdp (known_hosts2 only). You need to restart Remmina for deletion to take effect. – velis Jan 28 '19 at 08:14
6

This happened to me when I copied my remmina configuration (under ~/.remmina) from one machine to another. Perhaps the remmina versions were different; changing security did not help but deleting and recreating the connection did.

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
user1889941
  • 61
  • 1
  • 1
3

Probably stupid answer, but the problem for me was that I tried connecting through an open Wi-Fi network (unencrypted) and remmina wouldn't allow that. Once I connected to a secure network everything worked as planned again.

2

Today had the same problem with remmina 1.4.8, which I installed from flatpak. I tried all solutions, mentioned above, and none of them was working. I have two laptops, and on one remmina was working, but on new laptop with fresh installation it did not work. So only solution, that was working for me, was uninstalling flatpak version and installing deb version 1.4.2. And it works without any issue.

DMG
  • 61
  • 1
  • 4
2

Just to add to itsadok's answer

Had this same issue when trying to RDP into a Windows server. To confirm that the issue is not related to an incorrect password, I tried to SSH into an Ubuntu server and it worked fine.

Here's how I fixed it:

First, we need to delete the known_host/known_hosts/known_hosts2 file that Remmina uses:

If you installed Remmina as a snap package then run the command below to delete the known_host/known_hosts/known_hosts2 file:

sudo rm -rf ~/snap/remmina/current/.config/freerdp/known_hosts2

OR

sudo rm -rf ~/snap/remmina/current/.config/freerdp/known_hosts 

OR

sudo rm -rf ~/snap/remmina/current/.config/freerdp/known_host

If you installed Remmina as an apt package then run:

sudo rm -rf ~/.config/freerdp/known_host

Next, fully stop Remmina. To do so open the Remmina app and then run the command below to stop the Reminna process from the command line:

pgrep remmina | xargs sudo kill -9

You can then start the Remmina application again, this time everything should work fine.

That's all.

I hope this helps

Promise Preston
  • 253
  • 1
  • 3
  • 9
2

I had to change the Security protocol negociation to RDP protocol security in Advanced tab in order to be able to connect to a Windows Server R2 from Ubuntu 22.04 with Remmina 1.4.25.

Munjata KETA
  • 81
  • 1
  • 2
  • It took me a moment to find it. You need to right-click on the connection name and choose "Edit", then click the "Advanced" tab, and set the "Security protocol negotiation" to "RDP protocol security". – isapir Mar 22 '23 at 04:53
2

It worked for me by changing security to NLA for some unknown reason.

  • 2
    Welcome to Ask Ubuntu! I recommend to [edit] this answer to expand it with specific details about how to do this. (See also [How do I write a good answer?](/help/how-to-answer) for general advice about what sorts of answers are considered most valuable on AskUbuntu.) – David Foerster May 03 '17 at 10:27
  • 1
    Separate answers that you can upvote and downvote seems useful to me. Editing other peoples answers to insert "well, what about X", seems the opposite of useful. It's one thing to correct mistakes, go ahead and edit. But to tell a new person to go about editing instead of saying what worked for them seems the opposite of good. – Warren P Jun 13 '18 at 18:26
  • NLA didn't work for me but following a Windows update (I'll blame that) I had to change security settings from "Negotiate" to "RDP". – IpsRich Jan 16 '19 at 16:01
  • Negotiate to RDP worked for me :) – dan carter May 11 '22 at 05:00
1

It could also be an issue with the certificate verification, To test if this is the problem go to:

Advanced -> check "Ignore certificate"

Be careful, with this check disabled, you may be open to man in the middle attacks. But should be fine connecting on internal networks.

1

It appears to be a permission problem. Try:

sudo chattr -i ~/.local/share/remmina/RDP/known_hosts2

Note: Your known_hosts2 file location might differ based on your distro.

anakha
  • 111
  • 2
1

Note: xrdp service may have stopped in your remote service. As root:

  1. Confirm RDP port 3389 on remote system is listening. use: { $ netstat -tulpn }
  2. If port 3389 is closed verify xdrp is active use: { $ service xdrp status }
  3. If inactive...start it up use: { $ service xdrp start }
  4. To have xrdp service start automatically whenever system is power cycled use: { $ systemctl enable xdrp }
Femi Fawe
  • 11
  • 2
1

In my case, I was getting the error:

Could not connect to the RDP server "192.168.X.X" via TLS. See the DEBUG traces from a terminal for more information.

Happened after the latest remmina update in snap store May 19th 2022 (today), it was working on May 17th, two days ago before the update.

Turned out I was seeing a lot of "permission denied" errors inside the /home/username/snap/remmina directory.

I uninstalled and re-installed remmina from the snap store, and all started working again. Nothing about TLS or security or whatsoever.

Looks like permissions messed themselves up in /home/username/snap/remmina folder.

Update: happened again 15 days later.

Solution:

I uninstalled the snap version, and installed it from repository, and all is good.

Wadih M.
  • 282
  • 2
  • 8
1

I changed "Security protocol negotiation" from "TLS protocol security" to "RDP protocol security" in "Advanced" properties of "Remote Connection Profile" and it works.

Jan Vavra
  • 11
  • 1
1

So far, connections through bastion works when it wants with Remmina. I ended up by opening an SSH Tunnel from terminal like:

ssh -L 2000:<ip of windows machine>:3389 bastion

Then I configure Remmina to connect with RDP only at localhost:2000.

I know this looks ugly, but it's also rock solid. And if none of the tricks explained in this post (Like TLS, NLA, RDP in advanced for example), that one at launching an SSH tunnel will bypass all troubles related to Remmina and libssh.

jmary
  • 646
  • 4
  • 15
1

The problem is with the viewmode=1 setting in the saved conf file. If you resize the window it should refresh and start showing the session. Changing this boolean to 0 will force the window to defaults and it'll refresh on load. The problem is if you resize the window after the session has started, remmina will change this setting back.

A work around would be to set the window_maximize=0 to true and then just click/press the maximize button/shortcut to bring it back to your settings. 
window_maximize=1 
window_height=960 
viewmode=1 
Window_width=1440
JayMcB74
  • 11
  • 2
0

Remove the known_host file in ~/.config.

Run this command:

rm ~/.config/freerdp/known_host
Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
0

Had the same issue using a RDP connection with an SSH tunnel. The solution was to switch to "Tunnel via loopback address" in the SSH Tunnel settings.

Attempted all choices "Security Protocol Negotiation" and "Gateway Transport Type" with no success.

0

There are 2 connections. After upgrading to Ubuntu 22.04, one connection works, the other doesn't. An attempt to delete known_host: on the first connection it asks about the certificate, on the second it does not ask - it gives an error. Solved switching security to RDP.

0

first add a new connection profile configure ip address ,username and passwd there. then try its now working in my case. (u can find the option to add credentials on left upper corner)