1. Home
  2. Hosting & Servers
  3. Virtual Private Server [VPS]
  4. How to enable direct root login in the server
  1. Home
  2. Hosting & Servers
  3. Virtual Private Server [VPS]
  4. How to enable direct root login in the server

How to enable direct root login in the server

Now that virt-v2v is installed, the conversion server must be prepared to accept P2V client connections. The P2V client connects to the conversion server as root using SSH, so root login over SSH must be allowed on the conversion server.

Enable root login over SSH:

1. As root, edit the sshd_config file in /etc/ssh/sshd_config:

nano /etc/ssh/sshd_config

2. Add a line in the Authentication section of the file that says PermitRootLogin yes. This line may already exist and be commented out with a “#”. In this case, remove the “#”.

3. # Authentication:

4. #LoginGraceTime 2m

5. PermitRootLogin yes

6. #StrictModes yes

7. #MaxAuthTries 6

#MaxSessions 10

8. Save the updated /etc/ssh/sshd_config file.

9. Restart the SSH server:

service sshd restart

You can now connect to the conversion server as root over SSH.

Updated on November 26, 2022

Was this article helpful?