ubuntu ssh允许root用户远程登录
时间:2023年06月13日
/来源:网络
/编辑:佚名
安装好ubuntu后,用安装时设置的用户登录,然后设置root的密码
sudo passwd
设置好密码后,用root登录
su root
此时不能ssh远程登录,要修改ssh设置
vi /etc/ssh/sshd_config
注释掉 #PermitRootLogin without-password,添加 PermitRootLogin yes,如下:
# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes
重启ssh服务
service ssh restart
sudo passwd
设置好密码后,用root登录
su root
此时不能ssh远程登录,要修改ssh设置
vi /etc/ssh/sshd_config
注释掉 #PermitRootLogin without-password,添加 PermitRootLogin yes,如下:
# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes
重启ssh服务
service ssh restart
新闻资讯 更多
- 【建站知识】查询nginx日志状态码大于400的请求并打印整行04-03
- 【建站知识】Python中的logger和handler到底是个什么?04-03
- 【建站知识】python3拉勾网爬虫之(您操作太频繁,请稍后访问)04-03
- 【建站知识】xpath 获取meta里的keywords及description的方法04-03
- 【建站知识】python向上取整以50为界04-03
- 【建站知识】scrapy xpath遇见乱码解决04-03
- 【建站知识】scrapy爬取后中文乱码,解决word转为html 时cp1252编码问题04-03
- 【建站知识】scrapy采集—爬取中文乱码,gb2312转为utf-804-03