Ubuntu Server 20.04 开启SSH服务,允许root远程登录。

2,867次阅读
没有评论

Ubuntu Server 20.04 开启 SSH 服务,允许 root 远程登录。

默认安装 Ubuntu 都是不允许以 root 用户进行登录的,想要以 root 用户进行登录需要进行一些操作,主要是以下几个步骤:

1、sudo passwd root 设置 root 密码

2、修改 SSH 配置文件

可以通过 SSH 配置文件更改包括端口、是否允许 root 登录等设置,配置文件位置:

/etc/ssh/sshd_config

默认是不允许 root 远程登录的,可以再配置文件开启。

sudo vi /etc/ssh/sshd_config 修改

PermitRootLogin without-password

PermitRootLogin yes

3、sudo systemctl restart sshd 重启 sshd 服务

然后就可以使用 root 远程登录了。

正文完
 0
VPSWe
版权声明:本站原创文章,由 VPSWe 2022-02-20发表,共计309字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
验证码