"Possible problems with remote login using root account" error

更新时间:
复制 MD 格式

Fix the PermitRootLogin error during SMC Linux migration by enabling root SSH login on the source server.

This error occurs when you use SMC to migrate a Linux OS to Anolis OS and root SSH login is disabled on the source server.

Problem description

SMC reports this error during a Linux OS migration to Anolis OS.

Cause

The PermitRootLogin parameter in /etc/ssh/sshd_config on the source server is not set to yes.

Solution

  1. Connect to the source server. Connect to an instance.

  2. Set PermitRootLogin to yes in /etc/ssh/sshd_config:

    sudo sed -i 's/^PermitRootLogin no$/PermitRootLogin yes/' /etc/ssh/sshd_config
  3. Verify that PermitRootLogin is set to yes:

    grep ^PermitRootLogin /etc/ssh/sshd_config
  4. Restart the SSH service to apply the change:

    sudo systemctl restart sshd
  5. After you resolve the network issue, run the SMC client to retry the operation. For more information, see Run the SMC client.