1、打开vscode 在拓展商店搜索ssh remote安装插件
2、打开远程资源管理器 新建ssh target 然后编辑config文件
Host ***.***.***.***
HostName ***.***.***.***
User ***
Port 66
IdentityFile "C:\Users\***\.ssh\id_rsa"
3、win10端
eygen -t rsa -b 4096
记事本打开以下文件并复制
.ssh\id_rsa.pub
ubuntu端
复制内容到远程linux的
~/.ssh/authorized_keys
没有该路径需要新建,authorized_keys是文件不是目录
设置权限
chmod 700 ~/.ssh/
chmod 600 ~/.ssh/authorized_keys