SSH Secure Shell 版本:3.2.9
安装环境为:Windows 10 64位操作系统
具体操作步骤如下:
一、打开SSH Secure Shell(下述以简称SSH代替),通过账号密码方式登录服务器
二、Edit->Settings->Global Settings->User Authention->Keys
点击按钮Generate New...,Key Type选择RSA,Key Length选择默认的2048即可
文件名要和后面的命令对应起来,注释,密码
点击按钮“Upload Public key”,第二行要与服务器的实际名称保持一致,我的是.ssh
三、打开ssh目录
ssh-keygen -i -f server1.pub >>authorized_keys
chmod -R 700 /root/.ssh/
四、修改sshd_config
#新增或修改以下配置
PermitRootLogin yes
StrictModes no
RSAAuthentication yes
PubkeyAuthentication yes
五、重启服务
systemctl restart sshd
systemctl status sshd
六、现在可以免密码登录了,Authentication选择Public Key一项
好了,你也试一下吧