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 ...
随机推荐
- 关于swift使用CocoaPods倒入三方库的framework后父类倒入子类无法继承的问题
今天开发项目的时候遇到这么一个问题在使用cocoapods倒入了三方库后我在BaseController中倒入三方库,其余controller继承自basecontroller,然而在继承的子类中无法 ...
- iOS 编程之UIWindow切换
由于最近项目需要制作一个可定制的底部弹窗效果,因此研究了一下UIActionSheet,打算重写一个自定义的弹窗,在写demo的时候出于偷懒的原因,直接在新建项目的 - (void)viewDidLo ...
- Java – Try with Resources
1.介绍 Java 7中引入的对try-with-resources的支持使我们能够声明将在try块中使用的资源,并确保在执行该块后将关闭资源. ⚠️:声明的资源必须实现AutoCloseable接口 ...
- 当阿里面试官问我:Java创建线程有几种方式?我就知道问题没那么简单
这是最新的大厂面试系列,还原真实场景,提炼出知识点分享给大家. 点赞再看,养成习惯~ 微信搜索[武哥聊编程],关注这个 Java 菜鸟. 昨天有个小伙伴去阿里面试实习生岗位,面试官问他了一个老生常谈的 ...
- HTTP协议的学习总结
HTTP:HyperTextTransferProtocol是一种超文本传输协议,协议用在本地浏览器和服务器之间通信 HTTP基于TCP/IP传输数据,如图片,HTML文件 1.HTTP协议特点: 无 ...
- wsl中配置SML环境
配置SML/NJ #安装 sudo apt install smlnj #但是wsl不支持32位程序,所以需要下面配置 sudo dpkg --add-architecture i386 sudo a ...
- Centos网络的配置
...
- coding++:都说新的Arraylist 扩容是(1.5倍+1) 看了1.8的源代码发现不是这么回事
都说新的Arraylist 扩容是(1.5倍+1) 看了1.8的源代码发现不是这么回事 就用下面这段代码在jdk的三个版本运行看了下效果: import java.lang.reflect.Fiel ...
- JNDI数据源的配置及使用 (2010-11-21 21:16:43)转载▼
JNDI数据源的配置及使用 (2010-11-21 21:16:43)转载▼ 标签: 杂谈 分类: 数据库 数据源的作用 JDBC操作的步骤: 1. 加载驱动程序 2. 连接数据库 3. 操作数据库 ...
- JS中的offsetWidth/offsetHeight/offsetTop/offsetLeft、clientWidth/clientHeight/clientTop/clientLeft、scrollWidth/scrollHeight/scrollTop/scrollLeft
这是一组非常容易弄混的参数!都是描述某个盒子元素的宽度.高度以及上或左的距离偏移量. 1. offsetWidth / offsetHeight(不包括外边距) offsetWidth:返回元素的宽度 ...