首页 帮助中心 美国服务器 Ubuntu解除禁止root远程登录方法
Ubuntu解除禁止root远程登录方法
时间 : 2022-10-17 09:14:56 编辑 : 华纳云 阅读量 : 471

  有时为了安全通常会禁止root远程登录,但是如何解除禁止root远程登录?本篇文章为大家分享一下Ubuntu解除禁止root远程登录方法。

  编辑SSH服务配置文件

  编辑SSH服务的配置文件sshd_config,修改SSH的端口和root用户权限。

  使用到的命令:(按字母 i 进入编辑模式,按ESC退出编辑模式, :wq 保存退出)。

https://www.hncloud.com/uploads/UEditorImages/202210/17/617bc4acfc0c199beee137ecc58165bb.jpg

  1. 开放远程端口

https://www.hncloud.com/uploads/UEditorImages/202210/17/848c900331f99f5733db28a5a294cec8.jpg

  2. 允许root远程登录

https://www.hncloud.com/uploads/UEditorImages/202210/17/1708186bedadd02ded6869674592d1e2.jpg

  3. 重启ssh服务

  service sshd restart 或者 /etc/init.d/ssh restart

华纳云 推荐文章
centos如何开启root远程访问? Unix怎么限制root远程登录,有哪些方法 Ubuntu中解除root远程登录的方法 Unix怎么限制root远程登录
活动
客服咨询
7*24小时技术支持
技术支持
渠道支持