允许root用户登录ssh(Ubuntu)

1、使用普通用户登录Ubuntu系统,打开命令行窗口

2、更改root用户密码,命令:sudo passwd root

3、编辑ssh的配置文件,命令:nano /etc/ssh/sshd_config

4、在Authentication部分,注释掉“PermitRootLogin without-password”

5、在Authentication部分,添加“PermitRootLogin yes”

6、使用“Ctrl+o”保存数据,使用“Ctrl+X”退出编辑器

7、重新启动ssh服务,命令:sudo service ssh restart

8、然后就可以使用root帐号登录ssh

猜你喜欢

转载自blog.csdn.net/zth1002/article/details/51330499
今日推荐