How to enable SSH Root Access in Ubuntu

on Ubuntu 16.04

  1. ensure you have openssh-server server installed sudo apt-get install openssh-server

    sudo nano /etc/ssh/sshd_config

    1. change

      PermitRootLogin prohibit-password

    to

    PermitRootLogin yes 
    

    or sudo sed -i 's/prohibit-password/yes/' /etc/ssh/sshd_config

    1. in order to PAM authentication add

      AllowUsers root

    or sudo echo "AllowUsers root" >> /etc/ssh/sshd_config

    1. sudo service ssh restart

works fine

in order you don't know your root password set new with privileged user

sudo passwd root

  • 57 Users Found This Useful
Was this answer helpful?

Related Articles

How do I set reverse DNS (RDNS/PTR)?

Clients can set reverse DNS (RDNS/PTR) in the Control PanelClick the Network tab and...

Where can I find good Linux Tutorials?

Check out the following site: http://www.howtoforge.com/  

Protecting SSH with Fail2Ban

About fail2ban If a server is exposed to the Internet, attackers will scan that server for as...

rsyslog CPU Usage

rsyslogd has a tendency to use 100%+ CPU on OpenVZ. Please run the following commands with SSH to...

CentOS YUM Update/Install Issues

If you are using a new CentOS VPS and receiving errors when you try to use yum, please run the...