Home Issue Understanding and Resolving “Can Not Connect to Server!”

Understanding and Resolving “Can Not Connect to Server!”

Last updated on Jan 27, 2025

When using FlashPanel for remote server management, the platform establishes an SSH connection to the server to execute user requests. If this connection fails, the system will return the error message:
"Can not connect to server!"

Below are the possible reasons for this issue and how to resolve them.


Common Causes and Solutions

1. SSH/SFTP Access Disabled for System User

FlashPanel requires the system user to have SSH/SFTP access enabled to establish a connection.

Solution:

  1. Open FlashPanel and go to the Server Management page.

  2. Select the System Users tab.

  3. Check the "Can access SSH/SFTP" switch for the relevant system user.

    • If the switch is disabled, enable it by toggling it to the ON position.

2. Network Configuration Issues

Disruptions or misconfigurations in your network settings may prevent FlashPanel from reaching the server.

Solution:

  • Verify that your server and the FlashPanel platform are connected to a stable and properly configured network.

  • Test connectivity by pinging the server from your local machine. If the ping fails, investigate your network setup.


3. SSH Authentication Key Issues

If the SSH key used for authentication has been changed or is no longer valid, the connection attempt will be denied.

Solution:

  1. Ensure that the SSH key used by FlashPanel is valid and properly configured on the server.

  2. Re-add or update the SSH key in FlashPanel if necessary:

    • Go to the Server Management page in FlashPanel.

    • Update the SSH key for the server.


4. Firewall Blocking the Connection

Your server’s firewall might block the SSH connection due to specific rules or closed ports.

Solution:

  1. Check the firewall rules on your server. Ensure that port 22 (default SSH port) is open.

  2. If your server is hosted on a cloud platform like AWS, check the associated security group settings to allow SSH connections.

  3. Use the FlashPanel logs or a terminal to confirm that the server is reachable via SSH.


Next Steps

After addressing the above issues, retry the action in FlashPanel. If the error persists, contact FlashPanel support with detailed information about the issue, including the server logs and the steps already taken to resolve it.

By following this guide, you can resolve the "Can not connect to server!" issue and ensure smooth operation of your remote server management tasks.