1)windows的cmd终端输入ssh-keygen -t rsa,会生成私钥id_rsa和公钥id_rsa.pub 2)shell中输入vim authorized_keys命令,将windows的公钥id_rsa.pub复制粘贴到authorized_keys文件中 3)重启vscode即可