Plesk for Linux
kb: technical
Applicable to:
- Plesk for Linux
Symptoms
- Plesk migrator is unable to connect with source AWS Linux server with the following message:
CONFIG_TEXT: 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.
Comments
1 comment
Actually, to make everything clear:
Steps 1,2,3,4,5 are correct, but after step 6 you should also check that PasswordAuthentication is also set to yes, otherwise it will not work.
Please sign in to leave a comment.