ubuntu 下设置 root用ssh登录

ubuntu默认是不启用root用户也不允许root远程登录的。

启用root用户:sudo passwd root      //修改密码后就启用了。




1 修改ssh的配置文件
$ sudo vi /etc/ssh/sshd_config
找到PermitRootLogin no一行,改为PermitRootLogin yes

2. 重启 openssh server
$ sudo service ssh restart

之后就可以使用ssh软件连接服务器了。

猜你喜欢

转载自icedreamer.iteye.com/blog/2304091