Enable root login and change password - RaspberryPi

In Raspberry Pi from version Jessie onwards the "root" login for SSH sessions (via Putty Login) has been disabled by default. It can be enabled by just editing "sshd_config" file and then restarting "ssh" service.

To start with login to raspi via ssh using the default "pi" credentials. Then elevate yourself to super user "sudo"

# sudo -i

Then edit "/etc/ssh/sshd_config" and update the field "PermitRootLogin"

# vi /etc/ssh/sshd_config

From

PermitRootLogin without-password

To

PermitRootLogin yes

And then restart ssh service for the changes to take effect.

# /etc/init.d/ssh restart

You can also change the password for the root account by following these steps.

Login to raspi via ssh using the default "pi" credentials and the elevate yourself as super user "sudo" and run "passwd" to change the password.

# sudo -i
# passwd root

Output:

root@raspi-quad:~# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

RasPi Related Articles......

Its now possible to install the latest version of Nagios NRPE v 3.0.1 (source install) on RaspberryPi (incl. Pixel OS).
In Raspberry Pi from version Jessie onwards the "root" login for SSH sessions (via Putty Login) has been disabled by...
If you are getting this error while installing Nagios Core on RaspberryPi run these commands to resolve the error and...
Its now possible to install latest Nagios CORE version on Raspbian by following the steps in this article. Before writing...
Wake-On-LAN (WOL) is a very useful feature if you have got a LAB at home and want to make it...