Symptoms
-
When installing Plesk via Plesk Web Installer (https://get.plesk.com/) using root or a sudo user as SSH login, initialization fails with one of the following errors:
Could not connect to the target server. Process exited with status 1
-
The migration procedure fails fith the following message:
Could not connect to the target server. ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
Cause
SSH configuration of the server (source in case of the migration) not allow root login or/and Password authentification:
-
The
PermitRootLogin
or/andPasswordAuthentication
are disabled:# cat /etc/ssh/sshd_config | egrep 'PasswordAuthentication|PermitRootLogin' | grep -v "#"
PermitRootLogin no
PasswordAuthentication no -
The
AllowUsers
directive is enabled in the SSH configuration file but does not contain theroot
user:# cat /etc/ssh/sshd_config | grep 'AllowUsers'
AllowUsers johndoe
Resolution
-
Connect to the server (to the source server in case of the migration) via SSH as root.
-
Open the
/etc/ssh/sshd_config
file in any text editor. -
Find the
PermitRootLogin
or/andPasswordAuthentication
directives and edit them as follows:[BEFORE]
PermitRootLogin no
PasswordAuthentication no[AFTER]
PermitRootLogin yes
PasswordAuthentication yes -
If the
AllowUsers
directive is present in the SSH configuration file:# cat /etc/ssh/sshd_config | grep 'AllowUsers'
AllowUsers johndoeadd the
root
user as well to theAllowUsers
directive:[BEFORE]
AllowUsers johndoe[AFTER]
AllowUsers johndoe root -
Restart the SSH service to apply made changes:
# service sshd restart
-
Restart Plesk installation via Plesk Web Installer/Proceed with migration.