How to permit SSH root Login in Ubuntu 18.04

SSH root login is disabled by default in Ubuntu 18.04. SSH server for Ubuntu provides by the openssh-server package and root login is controlled by the PermitRootLogin directive in the OpenSSH server configuration (sshd_config file):
You can check the current status by running the following command:
grep -i "rootlogin" /etc/ssh/sshd_config
Root login is disabled, if the PermitRootLogin directive is commented out (# in front) or its value is not set to yes.

If you want to enable ssh root login, do the following steps with root privileges:
- Open the /etc/ssh/sshd_config:
vim /etc/ssh/sshd_config - Uncomment the line PermitRootLogin and set the value to yes:
PermitRootLogin yes - To make the new setting take effect, restart the ssh server:
systemctl restart sshd.service
Now that we have enabled ssh root login, you can try ssh using the root user from a remote computer:
ssh root@192.168.1.100
Note that Ubuntu root account does not have a password by default. So if you want to log in to root ssh account, first you muse have set a password for the root user.
Allowing the root user to login over SSH is a not a good idea. we don't need to login as root to get root privileges. You can ssh to your Ubuntu server using a user who has sudo privileges, then switch to the root user account using sudo -i command.
Next: Change Ubuntu SSH Port
How to permit SSH root Login in Ubuntu 18.04的更多相关文章
- 转载:如何在Ubuntu 18.04上使用UFW设置防火墙
https://blog.csdn.net/u013068789/article/details/82051943 介绍 UFW或Uncomplicated Firewall是iptables一个接口 ...
- Ubuntu 18.04 root 使用ssh密钥远程登陆
前言: Ubuntu默认是禁止root用户远程登陆 本教程解决Ubuntu 18.04版本 root用户 使用ssh密钥无法远程登陆的问题 问题发生的环境: 腾讯云,重装Ubuntu服务器时选择使用s ...
- Ubuntu 18.04 启动root账号并授权远程登录
Ubuntu 18.04 刚刚上市2个月,下载安装,尝尝鲜~ 安装界面看上去舒服许多, 安装的速度也较之前17.04 和16.04 都快了许多.抱歉,未截图. Ubuntu 安装完成后默认不启动roo ...
- Ubuntu 18.04系统中不能ssh外网远程
前言 今天我不小心动了电插板,导致服务器断电,用远程命令开机,居然很长时间没反应,索性就亲自按电源键重启.服务器正常开机启动,ssh可以内网访问,远程命令内网有效果,就是外网不行.经过分析排查,是不是 ...
- 在Ubuntu 18.04 下安装mysql,没有初始密码,重设root密码
在Ubuntu 18.04 下安装mysql 不知道是由于mysql更新为新版还是.Ubuntu18.04中的特性,安装过程中没有设置密码的环节,在网络上找了半天,总算解决了!特此记录下来,以便以后查 ...
- 如何在Ubuntu 18.04 LTS上安装和配置MongoDB
MongoDB是一款非关系型数据库,提供高性能,高可用性和自动扩展企业数据库. MongoDB是一个非关系型数据库,因此您不能使用SQL(结构化查询语言)插入和检索数据,也不会将数据存储在MySQL或 ...
- Ubuntu 18.04 Server上安装LAMP
由于要进行渗透测试,所以这两天就在搭LAMP的环境(过程及其痛苦) 这里分享一些我遇到的问题. 首先介绍一下我的使用环境 VM虚拟机,ubuntu 与主机NAT连接 由于之前一直使用的是kali(默 ...
- 如何在Ubuntu 18.04上安装Go
如何在Ubuntu 18.04上安装Go 谢鸢发表于云计算教程系列订阅98 介绍 课程准备 第1步 - 安装Go 第2步 - 设置Go路径 第3步 - 测试您的安装 结论 介绍 Go是Google开发 ...
- How to install the NVIDIA drivers on Ubuntu 18.04 Bionic Beaver Linux
Objective The objective is to install the NVIDIA drivers on Ubuntu 18.04 Bionic Beaver Linux. This a ...
随机推荐
- vulnhub~MyExpense
最近有点忙,这几天的vulnhub断更了,今天试着做了一下myexpense,当然想要一帆风顺是不可能的,哪怕是有别人的steps 和walkthrough.所以就遇到的坑总结如下: 一般套路就是nm ...
- Azure安装win2016的服务器,并下载安装mysql数据库心得
随便写写 第一部分:新建虚拟机创建win2016服务器 这部分内容跟着微软云提示操作即可, 基本步骤:创建一堆名字,选择一个地区的服务器,配置一些基本信息,然后azure就会自动创建虚拟机并安装你选择 ...
- Python多线程同步互斥锁
接着上篇多线程继续讲,上篇最后的多线程共享全局变量对变量的处理值出错在本文中给出解决方案. 出现这个情况的原因是在python解释器中GIL全局解释器锁. GIL:全局解释器锁,每个线程在执行的过程都 ...
- urllib笔记
在Python 3中,urllib2被合并到了urllib中,叫做urllib.request 和 urllib.error .urllib整个模块分为urllib.request, urllib.p ...
- 使用systemctl工具
使用systemctl工具 8.1问题 本例要求掌握systemctl控制工具的基本操作,完成下列任务: 重启httpd.crond.bluetooth服 ...
- MTK Androiod HAL如何向上层提供接口
Android中HAL如何向上层提供接口总结 转自:http://blog.csdn.net/flydream0/article/details/7086273 参考文献: http://blog.c ...
- Date 对象-->概念、创建以及方法
1.概念: Date 对象用于处理日期与时间. 2.创建: 方法1:直接用Date()函数,返回值当前时间 格式:var d = Date(); 注意:不论Date()是否带参数,返回都是当前时间 举 ...
- Linux C++ 网络编程学习系列(6)——多路IO之epoll高级用法
poll实现多路IO 源码地址:https://github.com/whuwzp/linuxc/tree/master/epoll_libevent 源码说明: server.cpp: 监听127. ...
- 理解JSON:3分钟课程
理解JSON:3分钟课程 博客分类: Java综合 jsonAjaxJavaScriptXMLLISP 本文是从 Understanding JSON: the 3 minute lesson 这篇文 ...
- C++_编程前奏
计算机硬件系统 计算机操作系统的五大组成部分 计算机操作系统的组成部分 构成 控制器 指令寄存器(IR)/程序计数器(PC)/操作控制器(OC) 运算器 算数逻辑单元/累加器/状态寄存器/通用寄存器 ...