Software & AppsOperating SystemLinux

Fixing Remmina’s “Cannot connect to RDP server localhost” Error

Ubuntu 3

Remmina is a highly popular Remote Desktop Client written in GTK+, aiming to be useful for system administrators and travelers who need to work with lots of remote computers. However, users may occasionally encounter the error message “Cannot connect to RDP server localhost.” This article will guide you through several methods to resolve this issue.

Change the Security Protocol

One of the first steps you can take is to change the security protocol in Remmina’s connection properties.

  1. Open Remmina and navigate to the connection properties.
  2. Go to the “Advanced” tab.
  3. Change the security protocol from “Negotiate” to “TLS” or “RDP.”

The security protocol is responsible for establishing a secure connection between your client and the server. By changing it, you may resolve any issues causing the error.

Delete the known_hosts File

If the keys on the tunnel server have changed, you may encounter connection issues. To resolve this, you can delete the known_hosts file. The file location may vary depending on your setup.

To delete the file, open your terminal and input the following command:

rm ~/.freerdp/known_hosts

or

rm ~/.config/freerdp/known_hosts

The rm command is used to remove files or directories in Linux. The ~ symbol represents your home directory, and the .freerdp/known_hosts is the path to the file you want to delete.

Recreate the Connection

If you’ve copied your Remmina configuration from one machine to another, it may cause compatibility issues. In this case, deleting and recreating the connection can resolve the problem.

Check Network Security

Ensure that you are connected to a secure Wi-Fi network. Connecting through an open, unencrypted network may cause connection problems. Switching to a secure network can help resolve the issue.

Verify Certificate Verification

In Remmina’s connection properties, go to the “Advanced” tab and check the “Ignore certificate” option. This can help if there are certificate verification issues. However, be cautious as disabling certificate verification can expose you to potential security risks.

Check Permissions

If you are using the snap version of Remmina and encounter permission denied errors, it may indicate a permissions issue. Uninstalling and reinstalling Remmina from the snap store or installing it from the repository can help resolve the problem.

Switch Security Protocol Negotiation

In Remmina’s connection properties, go to the “Advanced” tab and change the “Security protocol negotiation” from “TLS protocol security” to “RDP protocol security.” This solution has worked for some users.

Use SSH Tunneling

If all else fails, you can try establishing an SSH tunnel manually using the command:

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

And configure Remmina to connect to localhost:2000 using RDP. The -L option specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side.

Remember, it’s important to carefully follow the instructions and consider the security implications of the solutions provided. With these steps, you should be able to resolve the “Cannot connect to RDP server localhost” error in Remmina.

What is Remmina?

Remmina is a Remote Desktop Client written in GTK+ that allows users to connect and work with remote computers.

How can I change the security protocol in Remmina?

To change the security protocol in Remmina, open the connection properties, go to the "Advanced" tab, and select the desired security protocol from the dropdown menu.

Where can I find the `known_hosts` file?

The location of the known_hosts file may vary depending on your setup. In most cases, it can be found in either ~/.freerdp/known_hosts or ~/.config/freerdp/known_hosts.

How do I delete the `known_hosts` file?

To delete the known_hosts file, open your terminal and use the rm command followed by the path to the file. For example, rm ~/.freerdp/known_hosts or rm ~/.config/freerdp/known_hosts.

What should I do if I copied my Remmina configuration to another machine and encounter connection issues?

If you experience compatibility issues after copying your Remmina configuration, it is recommended to delete and recreate the connection on the new machine to resolve any problems.

Why am I experiencing connection issues when using an open, unencrypted Wi-Fi network?

Open, unencrypted Wi-Fi networks are less secure and can pose potential risks. It is advised to connect to a secure Wi-Fi network to avoid connection problems.

How can I check the certificate verification settings in Remmina?

In Remmina’s connection properties, go to the "Advanced" tab and check or uncheck the "Ignore certificate" option to enable or disable certificate verification.

Why am I getting permission denied errors when using the snap version of Remmina?

Permission denied errors in the snap version of Remmina may indicate a permissions issue. Try uninstalling and reinstalling Remmina from the snap store or installing it from the repository to resolve the problem.

What should I do if changing the security protocol negotiation doesn’t resolve the issue?

If changing the security protocol negotiation doesn’t work, you can try establishing an SSH tunnel manually using the provided command and configure Remmina to connect to localhost:2000 using RDP.

Please note that these answers are based on the information provided in the article.

Leave a Comment

Your email address will not be published. Required fields are marked *