vim /etc/ssh/sshd_config
默认配置不变append选项
修改客户端PermitRootLogin yes
PasswordAuthentication yes
UseDNS no
在客户端使用rss-keygen生成RSA秘钥对
id_rsa
id_rsa.pub
id_rsa文件保存在本机 ~/.ssh/
使用ftp把id_rsa.pub上传到服务器端后执行
cat id_rsa.pub>>~/.ssh/authorized_keys
重新链接
ssh root@192.168.1.10
The authenticity of host ‘192.168.1.10 (192.168.1.10)’ can’t be established.
ECDSA key fingerprint is SHA256:KbGgWlzTk56lc0O1tyi7bSPR********************.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
不要选择默认,输入yes
可能是服务器是本机虚拟机上的原因吧,只能这样才能登陆。



