By accessing the website and accepting the Cookie Policy, you agree to use the cookies provided by the Site in accordance with to analyze traffic, remember your preferences, and optimize your experience.
Ubuntu Server 20.04 开启SSH服务,允许root远程登录
2022-04-08 16:42:19    220    0    0
emengweb

 

默认安装 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 远程登录了。

上一篇: 搭建echoip,显示外网IP、地理位置信息

下一篇: 独立服务器 SoYouStart 通过 IPMI 挂载本地 ISO 安装系统

220 人读过
文档导航