anynet_closed fix

If you use AnyDesk to connect to remote machines, you might have encountered an issue where the connection starts but quickly drops, leaving you with an error message. The error messages may vary, including:
“The network connection was closed unexpectedly.”
“Session closed. The session has ended.”
“Status: AnyNet closed.”
“Error No. 104: Network timeout.”

These errors indicate a networking issue. I recently faced this problem while trying to connect to a remote machine, and here’s how I diagnosed and resolved it.

Is It a Linux or Windows Issue?

As a Linux user (I use Arch), I initially suspected the issue might be Linux-specific. To rule this out, I booted into Windows on the same machine and tried connecting via AnyDesk. The same error occurred, confirming that the problem was not related to the operating system but rather an internet or network issue.

Troubleshooting Steps

Here’s a step-by-step guide to diagnosing and fixing this AnyDesk connection issue:

1. Check the Time and Date on Both Machines

Many network protocols, including authentication and encryption, rely on accurate date, time, and time zone settings. Ensure both the local and remote machines have the correct time and date.

2. Restart the Remote Machine and Network Devices

One of the most common troubleshooting steps recommended online is to restart:

The remote computer

The modem or router at the remote location

AnyDesk on the remote machine

In my case, I had someone at the remote location restart the PC and power cycle the router, but the issue persisted.

3. Check Firewall and Network Restrictions

Firewalls or network configurations might block AnyDesk’s required ports. Try disabling the firewall on the remote machine temporarily to see if it resolves the issue. If the firewall is the cause, configure it to allow AnyDesk’s network traffic.

4. Use the SLNP Connection Method

After multiple failed attempts, I found a solution: using the SLNP (Session-Less Network Protocol) connection method.

How to Use SLNP:

Take the remote machine’s AnyDesk ID (a numeric or alphanumeric identifier).

Append /np to the ID when connecting (e.g., 123456789/np).

Press Connect.

If AnyDesk is already installed and configured on the remote machine, and the connection profile is saved, it will not prompt for a password again.

Final Thoughts

If you’re facing frequent disconnections or connection failures with AnyDesk, it’s likely a networking issue rather than an OS problem. Ensure the date and time are correct, restart network devices, and check firewall settings. If all else fails, try appending /np to the remote machine ID, which in my case successfully re-established the connection.

Have you encountered a similar issue? Let me know in the comments how you resolved it!

Leave a Comment