Step 1: Create an SSH User for a Domain
Before you can log in via SSH, ensure you have an SSH user set up for the domain. There are two ways to do this:
Option 1: Enable SSH Access for a Specific Domain
- Log in to Plesk.
- Navigate to Websites & Domains.
- Click on the domain you want to enable SSH access for.
- Go to Hosting & DNS > Hosting Settings.
- Scroll to the bottom of the page.
- Locate the SSH access setting and change the type from
Forbidden
to/bin/bash/
.
Option 2: Create a Temporary Domain Package
Alternatively, if you need a temporary SSH user, you can create a new domain package and enable SSH access when setting up the package.
Step 2: Gain Superuser Access
Once SSH access is enabled for the domain, follow these steps to gain superuser privileges:
- Open your SSH client and connect to the server using the domain’s SSH username and password.
- Run the following command to switch to a superuser:
su
- Enter the password for the Plesk Administrator when prompted.
Step 3: Modify SSH Configuration
To ensure root login is permitted, follow these steps:
- Open the SSH configuration file using a text editor such as
vim
ornano
:vim /etc/ssh/sshd_config
or
nano /etc/ssh/sshd_config
- Locate the line that reads:
#PermitRootLogin prohibit-password
- Modify it to:
PermitRootLogin yes
(If there is a
#
at the beginning of the line, remove it.) - Save the changes and exit the editor.
Step 4: Restart the SSH Service
After modifying the configuration, restart the SSH service to apply the changes:
systemctl restart sshd
This will disconnect you from the server temporarily. Wait for about a minute, then attempt to reconnect. At this point, the Plesk Migration Tool should work as expected.
Step 5: Restart SSHD from the Recovery Console (If Needed)
If you are unable to log back in after restarting SSH, manually restart the SSH service using the recovery console:
- Navigate to your VPS dashboard.
- Click the drop-down menu Server Actions and select Recovery Console.
- Log in as the root user when prompted.
- Use the Plesk admin password when asked.
- Restart the SSH service manually by running:
systemctl restart sshd
This should resolve any connection issues and allow the Plesk Migration Tool to function correctly.
With SSH access properly configured, you can efficiently manage your Plesk environment and carry out migrations smoothly. If you run into any issues, don’t hesitate to contact our support team for assistance. You can reach out via your Customer Area.