remmina no longer working "cannot connect to RDP server localhost"
Andrew Mclaughlin
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?
115 Answers
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 :)
5This 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:
4
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 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
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.
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.
2It worked for me by changing security to NLA for some unknown reason.
4Today 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.
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 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.
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_hosts2OR
sudo rm -rf ~/snap/remmina/current/.config/freerdp/known_hosts OR
sudo rm -rf ~/snap/remmina/current/.config/freerdp/known_hostIf you installed Remmina as an apt package then run:
sudo rm -rf ~/.config/freerdp/known_hostNext, 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 -9You can then start the Remmina application again, this time everything should work fine.
That's all.
I hope this helps
Remove the known_host file in ~/.config.
Run this command:
rm ~/.config/freerdp/known_host It appears to be a permission problem. Try:
sudo chattr -i ~/.local/share/remmina/RDP/known_hosts2Note: Your known_hosts2 file location might differ based on your distro.
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.
Note: xrdp service may have stopped in your remote service. As root:
- Confirm RDP port 3389 on remote system is listening. use: { $ netstat -tulpn }
- If port 3389 is closed verify xdrp is active use: { $ service xdrp status }
- If inactive...start it up use: { $ service xdrp start }
- To have xrdp service start automatically whenever system is power cycled use: { $ systemctl enable xdrp }
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.
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.