Check the network connection
First make sure your local network connection is stable. If you are using a WiFi connection, try using a wired connection to rule out an unstable WIFI signal.
Check the VPS's network
You can test if the VPS's network is working by using the ping command or traceroute command. If the ping command or traceroute command fails to connect to the VPS, it may be a network problem with the VPS provider.
Check the firewall configuration
If you have a firewall installed on your VPS, it may block access to certain ports. Make sure your firewall is configured correctly and allows the required ports.
Restarting VPS
Sometimes, restarting the VPS can solve network problems,. You can access the VPS through the control panel or ssh and execute the reboot command.
Contact the VPS provider
If you have tried the above and still can't solve the problem, it may be a problem with the network provided by the VPS. You can contact the VPS provider's technical support team.