先安装openssh-server服务,配置开启root登录,给服务器root设置下密码,使用ssh root@xxx远程登录即可,windows下也可使用putty,xshell进行ssh登录
sudo apt install openssh-server #安装 ssh-server 服务
ps -ef|grep ssh #查看服务是否正常启动
sudo service sshd start #启动 ssh 服务
vim /etc/sshd/sshd_config #在 sshd 文件中添加 PermitRootLogin yes
service sshd restart #重启ssh服务
sudo passwd root #设置服务器 root 密码
ssh root@xx.xx.xx.xx #使用 root 用户进行远程登录