Symptoms
- Plesk migrator is unable to connect with source AWS Linux server with the following message:
Please login as the user “centos” rather than the user “root”
Cause
Root login over ssh is not permitted on the source server.
Resolution
-
Connect to the server via SSH.
-
Change user to root:
# sudo -s
- Backup
/root/.ssh/authorized_keys
file:# cp /root/.ssh/authorized_keys /root/.ssh/authorized_keys_backedup
- Open file
/root/.ssh/authorized_keys
in a text editor, in this example we’re using vi editor.# vi /root/.ssh/authorized_keys
-
Delete all text before “ssh rsa” and save the file.
-
Open file /etc/ssh/sshd_config in a text editor.
# vi /etc/ssh/sshd_config
- Set ‘PermitRootLogin’ and ‘PasswordAuthentication’ parameters to ‘yes’.
# cat /etc/ssh/sshd_config | egrep “PasswordAuthentication|PermitRootLogin”
PasswordAuthentication yes
PermitRootLogin yes - Restart SSHD service:
# systemctl restart sshd.service
- Redo the migration.