Articles in this section

Unable to start Plesk migration or connect via SSH Terminal extension due to invalid permissions on .ssh files: Permission denied (publickey,gssapi-with-mic,password)

Plesk for Linux kb: technical ext: migrator ABT: Group B

Applicable to:

  • Plesk for Linux

Symptoms

  • Plesk migration fails with the following error message in Plesk:

    PLESK_ERROR: Failed to fetch basic information about resellers, clients and domains data from source servers
    <...>
    stderr: Permission denied (publickey,gssapi-with-mic,password).
    rsync: connection unexpectedly closed (0 bytes received so far) [sender]
    rsync error: unexplained error (code 255) at io.c(605) [sender=3.0.9]

  • Plesk admin user cannot access the server via SSH using the SSH Terminal extension:

    PLESK_ERROR: Connection Broken

    PLESK_ERROR: root@127.0.0.1: Permission denied (publickey).

  • One of the following error messages appears in the logfile /var/log/secure (CentOS/RHEL) or /var/log/auth.log (Debian/Ubuntu) on the source server:

    CONFIG_TEXT: Authentication refused: bad ownership or modes for directory /root

    CONFIG_TEXT: Authentication refused: bad ownership or modes for directory /root/.ssh

    CONFIG_TEXT: Authentication refused: bad ownership or modes for file /root/.ssh/authorized_keys

Cause

Wrong permissions on the directories /root or /root/.ssh or files inside /root/.ssh.

Resolution

  1. Connect to the (source) server via SSH.
  2. Run the commands below to correct permissions:
    • on the /root directory:

      # chmod 550 /root && chown root:root /root

    • on the /root/.ssh directory:

      # chown -R root:root /root/.ssh && chmod 600 /root/.ssh

    • on the files inside /root/.ssh:

      # chmod 600 /root/.ssh/*

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.