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 ...

Upgrade Red Hat Satellite...

Written By Farooq Mohammed Ahmed on Friday, 22 April 2016 18:33
Upgrade Red Hat Satellite...

Cacti Install and Config ...

Written By Farooq Mohammed Ahmed on Monday, 30 November 2015 11:13
Cacti Install and Config ...

Using awk in Alias Comman...

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

Replace SSL Certificates ...

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