vscode SSH 免密登录

125 阅读1分钟

下载插件

image.png

Remote - SSH 通过 SSH 连接到远程服务器
Remote - SSH: Editing Configuration Files 允许你直接在 VSCode 中编辑 SSH 配置文件
Remote Explorer 用于在 VSCode 中浏览和管理远程连接

配置ssh

image.png

image.png

Host ai
HostName host地址
  Port ssh的端口
  User ssh用户名
  IdentityFile "C:\Users\xxx\id_rsa"
  • id_rsa 就是下图的 id_rsa

设置服务器的authorized_keys

image.png

  • 将id_rsa.pub的内容复制到 authorized_keys 文件中 没有就创建一个

2024/3/7 🌤