Vscode通过密钥进行ssh连接方式

下载ssh插件

ctrl+shift+p搜索并打开ssh配置文件

写入类似配置

# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host root 8.138.128.122
  HostName 8.138.128.122
  User root
  IdentityFile ~/.ssh/xxx.pem

Host wdh99 8.138.128.122
  HostName 8.138.128.122
  User wdh99
  IdentityFile ~/.ssh/id_rsa