安装ssh服务
apt-get update
apt-get install openssh-server
apt-get install vim
设置SSH登录密码,默认密码9r2F0K$@fi6INWT8%*
passwd
修改配置文件
修改#PermitRootLogin prohibit-password
-> PermitRootLogin yes
vim /etc/ssh/sshd_config
#PermitRootLogin prohibit-password
PermitRootLogin yes
PasswordAuthentication yes
重启ssh
service ssh restart
开启免密登录
ssh-copy-id -i ~/.ssh/id_ed25519.pub id_rsa.pub root@server.ip