1.用密令在linux主机生成rsa公私钥 ssh-keygen -t rsa
2.查看对应目录的公私钥文件
3.将公钥 id_rsa.pub
放入authorized_keys
文件中
cat id_rsa.pub >> authorized_keys
4.将私钥id_rsa
下载至本地.ssh目录下
VS code的ssh配置目录:C:\Users\[username]\.ssh
5.修改目录下config文件
# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host 随便起什么名字
HostName 124.0.0.0
Port 22
User root
IdentityFile C:\Users\[username]\.ssh\id_rsa