Ubuntu开启root远程登录

  1. 设置root账户密码

sudo passwd root

[sudo] password for laokamo: 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
  1. 切换到root

su

Password: 输入root密码
  1. 编辑sshd_config

vim /etc/ssh/sshd_config

将
#PermitRootLogin prohibit-password
修改为
PermitRootLogin yes
  1. 保存并退出

:wq!

  1. 重启ssh服务

service ssh restart

# Ubuntu 

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×