安装SSH
sudo apt-get install openssh-server -y
为root用户创建密码
sudo passwd root
切换为root用户,并且编辑sshd_config文件,修改以下三项。
UsePAM no
PasswordAuthentication yes
PermitRootLogin yes
su root vim /etc/ssh/sshd_config
重启ssh服务
/etc/init.d/ssh restart
sudo apt-get install openssh-server -y
sudo passwd root
UsePAM no
PasswordAuthentication yes
PermitRootLogin yes
su root vim /etc/ssh/sshd_config
/etc/init.d/ssh restart
转载于:https://www.cnblogs.com/idontknowthisperson/p/11189677.html