Notification texts go here Contact Us Buy Now!

How to Enable SSH Root Login in Debian 8

This tutorial describes how to enable ssh root login in debian 8 jessie. Why by default root login is not enabled in debian based operating system answer is simple Security reason. If the ssh is enabled for root users your system will be easily compromised by brute force attack

!!!Warning:- Enabling SSH root login is not recommended in production Environment.
Enable SSH root login on Debian Linux Server
My Scenario:-  There are some particular instances root login comes handy one such situation i faced was when convert the Physical Debian box into Virtual Environment.

Error:- 
login as: root
root@192.168.20.101's password:
Access denied
root@192.168.20.101's password:
Access denied
root@192.168.20.101's password:
Access denied
root@192.168.20.101's password:

Step #1
Login into Debain system using user account you had created earlier and switch to root user using "su".
superuser@GNS3-Test:~$ su
Password:[Your root password]

Step #2
root@GNS3-Test:/home/superuser# vi /etc/gdm3/daemon.conf
How to Enable SSH Root Login in Debian 8

Under security add “AllowRoot=true”. So your security section in the file should look like this:[security]

AllowRoot=true 
Once it looks like this save the file then exit the window.
Step #3 

root@GNS3-Test:/home/superuser# vi /etc/pam.d/gdm-password
comment this line "auth required pam_succeed_if.so user != root quiet_success"
#auth required pam_succeed_if.so user != root quiet_success
Step #4
root@GNS3-Test:/home/superuser#service ssh restart
â ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled)
   Active: active (running) since Mon 2016-10-17 16:25:04 IST; 11s ago
  Process: 896 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
 Main PID: 1431 (sshd)
   CGroup: /system.slice/ssh.service
           ââ1431 /usr/sbin/sshd -D

Oct 17 16:25:04 GNS3-Test systemd[1]: Started OpenBSD Secure Shell server.
Oct 17 16:25:04 GNS3-Test sshd[1431]: Server listening on 0.0.0.0 port 22.

Oct 17 16:25:04 GNS3-Test sshd[1431]: Server listening on :: port 22.

Now you should able to login root account through ssh 

I hope you this information is useful for you. Please forgive any typos or incomplete sentences.

إرسال تعليق

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.