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 ...
随机推荐
- DAO,Service,Controler的简介
DAO层: DAO层叫数据访问层,全称为data access object,属于一种比较底层,比较基础的操作,具体到对于某个表的增删改查,也就是说某个DAO一定是和数据库的某一张表一一对应的,其中封 ...
- 【tensorflow2.0】张量的结构操作
张量的操作主要包括张量的结构操作和张量的数学运算. 张量结构操作诸如:张量创建,索引切片,维度变换,合并分割. 张量数学运算主要有:标量运算,向量运算,矩阵运算.另外我们会介绍张量运算的广播机制. 本 ...
- JavaScript五子棋第二版
这是博主做的一个移动端五子棋小游戏,请使用手机体验.由于希望能有迭代开发的感觉,所以暂时只支持双人对战且无其他提示及对战界面,只有胜利提示,悔棋.对战双方显示.人机对战.集成TS(用于学习).和局 ...
- 是什么是递归?-[all]-[编程理论]
递归是所有编程语言中,都会讨论到的一个问题. Content Of Table 递归的通俗认识 编程领域的抽象 一个最简单的示例 一点总结 栈溢出问题 本示例的一点拓展说明 ### 递归的通俗认识 编 ...
- 类实例调用静态方法(Java)
前言 第一次看到在Java中是可以通过类实例调用静态方法,当然不推荐这么做,接下来会讲到,但是在C#中通过类实例调用静态方法在编译时就不会通过,这里做下记录. 类实例调用静态方法 首先我们来看一个简单 ...
- 关于代码覆盖 or 冲突
关于代码覆盖 or 冲突 在使用git同步代码时,步骤一般为 commit -> pull -> push 那这个过程的意义何在呢? 首先是区分本地仓库 与 远程仓库,可以理解为本地git ...
- PTA数据结构与算法题目集(中文) 7-6
PTA数据结构与算法题目集(中文) 7-6 7-6 列出连通集 (25 分) 给定一个有N个顶点和E条边的无向图,请用DFS和BFS分别列出其所有的连通集.假设顶点从0到N−1编号.进行搜索时, ...
- mysql物理级别热备脚本
#!/bin/bash mysql_backup_dir=/data/databaseup/ mysql_username="root" mysql_password=" ...
- 微信小程序实现滑动tab切换和点击tab切换并显示相应的数据(附源代码)
这里主要用到了swiper组件和三目运算,直接上代码, 样式只有三个class,简单粗暴,懒的小伙伴们可以直接拿来用,喜欢的点个支持 <view> <view class=" ...
- ubuntu安装fastdfds
ubuntu安装fastdfds 安装fastdfds依赖 cd /user/local wget https://github.com/happyfish100/libfastcom ...