How to Enable Root Access via SSH on Your VPS for Migration


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

  1. Log in to Plesk.
  2. Navigate to Websites & Domains.
  3. Click on the domain you want to enable SSH access for.
  4. Go to Hosting & DNS > Hosting Settings.
  5. Scroll to the bottom of the page.
  6. 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:

  1. Open your SSH client and connect to the server using the domain’s SSH username and password.
  2. Run the following command to switch to a superuser:
    su
  3. Enter the password for the Plesk Administrator when prompted.

Step 3: Modify SSH Configuration

To ensure root login is permitted, follow these steps:

  1. Open the SSH configuration file using a text editor such as vim or nano:
    vim /etc/ssh/sshd_config

    or

    nano /etc/ssh/sshd_config
  2. Locate the line that reads:
    #PermitRootLogin prohibit-password
  3. Modify it to:
    PermitRootLogin yes

    (If there is a # at the beginning of the line, remove it.)

  4. 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:

  1. Navigate to your VPS dashboard.
  2. Click the drop-down menu Server Actions and select Recovery Console.
  3. Log in as the root user when prompted.
  4. Use the Plesk admin password when asked.
  5. 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.


We will be happy to hear your thoughts

Leave a reply

Som2ny Network
Logo
Compare items
  • Total (0)
Compare
0