ubuntu server 16.04 开启root密码登录
程序员文章站
2023-02-01 10:39:26
0x00 ubuntu server 16.04 开启root密码登录由于众多VPS默认使用证书验证登录,虽然安全但使用十分不便,所以特提供开启root用户并使用密码登录方法。0x01 为root账户设置密码$ sudo passwd root0x02 进入root账户$ su root0x03 编... ......
0x00 ubuntu server 16.04 开启root密码登录
由于众多vps默认使用证书验证登录,虽然安全但使用十分不便,所以特提供开启root用户并使用密码登录方法。
0x01 为root账户设置密码
$ sudo passwd root
0x02 进入root账户
$ su root
0x03 编辑sshd_config文件
$ vi /etc/ssh/sshd_config
做如下修改:
1.允许root账户登录permitrootlogin without-password
~修改为~permitrootlogin yes
2.允许密码登录passwordauthentication no
~修改为~passwordauthentication yes
3.关闭证书验证登录(::确认可以使用密码登录后再做此修改,避免发生无法登录服务器的验证后果::)usepam yes
~修改为~usepam no
0x04 重启sshd服务
$ sudo service ssh restart
本文转载自http://kiros.onbeta.com/linux/ubuntu-server-1604-kai-qiroot-mi-ma-deng-lu.html
推荐阅读
-
Ubuntu16.04 server下配置MySQL,并开启远程连接的方法
-
Ubuntu16.04 server下配置MySQL,并开启远程连接的方法
-
ubuntu16.04服务器配置ssh免密码登录
-
ubuntu server 16.04 开启root密码登录
-
ubuntu server 20.04 设置root用户登录
-
windows server安装MongoDB 并开启远程(账号密码验证)登录
-
2020-10-20 Ubuntu 16.04安装配置Samba服务每个用户可以用自己的用户名和密码登录自己的home目录以及共享特定的目录
-
ubuntu16.04服务器配置ssh免密码登录
-
ubuntu16.04 开启22端口设置允许root用户登录
-
Ubuntu开启root用户登录Ubuntu开启root用户登录