ubuntu 允许root用户登录到ssh

ubuntu的系统太太太麻烦了,我喜欢centos,但是还是要用ubuntu做东西,讨厌,装完系统以后,因为他不让你用root,我新建了一个wqz的用户名。

1、首先更新root的密码

sudo passwd root

根据提示,写入当前用户的密码,root新密码,确认密码,ok,完成。

2、编辑ssh的配置文件

vim /etc/ssh/sshd_config

如果没装ssh怎么办?装一个啊(废话),

2.1、sudo apt-get install openssh-server 安装

2.2、sudo ps -e |grep ssh       检查状态

2.3、sudo service ssh start      没启动就启动啊

3、安装完以后,vim /etc/ssh/sshd_config,在Authentication部分,

  注释掉PermitRootLogin prohibit-password,就是前面加个#,

  新增:在Authentication部分,添加“PermitRootLogin yes”

  保存退出。

4、重启ssh服务器

sudo service ssh restart

5、然后用ftp工具登录就好了,记得连接方式用ssh哦!