Help Center/ Elastic Cloud Server/ FAQs/ Remote Login FAQ/ Remote Login Errors on Linux/ Why Am I Seeing the Error Message "Access denied" When I Remotely Log In to a Linux ECS?
Updated on 2024-04-18 GMT+08:00

Why Am I Seeing the Error Message "Access denied" When I Remotely Log In to a Linux ECS?

Symptom

When you attempt to remotely log in to a Linux ECS, the system displays the error message "Access denied".

Possible Causes

  • Incorrect username or password.
  • A policy that denies logins from user root is enabled on the SSH server.

Solution

  • If the username or password is incorrect,

    Check the username and password.

    The default username for logging in to a Linux ECS is root. If the password is incorrect, reset it on the management console.

    To reset a password, locate the row containing the target ECS, click More in the Operation column, and select Reset Password from the drop-down list.

  • If a policy that denies logins from user root is enabled on the SSH server,
    1. Edit the /etc/ssh/sshd_config file and check the following settings to ensure that the SSH logins from user root are allowed:
      PermitRootLogin yes
    2. Restart SSH.
      • CentOS 6

        service sshd restart

      • CentOS 7

        systemctl restart sshd