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

Most Read Articles

Add/Detect a new disk in ...

Written By Farooq Mohammed Ahmed on Sunday, 11 January 2015 19:22
Add/Detect a new disk in ...

Replace SSL Certificates ...

Written By Farooq Mohammed Ahmed on Friday, 16 December 2016 08:05
Replace SSL Certificates ...

Using awk in Alias Comman...

Written By Farooq Mohammed Ahmed on Friday, 19 February 2016 14:22
Using awk in Alias Comman...

Script to Monitor Nagios ...

Written By Farooq Mohammed Ahmed on Monday, 18 July 2016 22:48
Script to Monitor Nagios ...

Generate/Create a SHA2/SH...

Written By Farooq Mohammed Ahmed on Tuesday, 25 October 2016 13:56
Generate/Create a SHA2/SH...