Site icon RDR-IT

Log root SSH on Ubuntu/ Debian

SSH

By default, the connection with the root account is not possible because it does not have a password and the SSH server is configured so as not to allow connection with the root account.

It happens that for some operation / installation the root account is required.

In this tutorial, we will have how to configure Ubuntu / Debian in order to connect with the Root account in SSH.

Set a root password

sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Allow SSH connection as Root

Edit the following file: / etc / ssh / sshd_config

Comment the following line:

PermitRootLogin prohibit-password

Add below:

PermitRootLogin yes

Restart the SSH service

sudo service ssh restart

You should now be able to log in as root with Putty and WinSCP.

Exit mobile version