1. Windows 10 ,启动cmd
ssh-keygen -t rsa -b 4096
2. 将C盘用户目录下的 .sshid_rsa.pub文件复制到服务器 ~/.ssh/ 文件夹下,然后执行下述命令即可
cd ~/.ssh cat id_rsa.pub >> authorized_keys ls # 查看确保生成功authorized_keys
ssh-keygen -t rsa -b 4096
cd ~/.ssh cat id_rsa.pub >> authorized_keys ls # 查看确保生成功authorized_keys