vscode连接ssh免密

Windows端生成私钥

ssh-keygen -t rsa -f ~/.ssh/id_rsa_manjaro //rsa后缀用于和github密钥区分开

查看私钥

cat id_rsa_manjaro.pub //这一步在windows或者ubuntu都可以

Ubuntu添加私钥

/root/.ssh里的authorized_keys 添加进去cat的结果

vscode设置ssh的config

1
2
3
4
5
Host Manjaro
HostName 192.168.1.100
User boqi
IdentityFile ~/.ssh/id_rsa_manjaro
IdentitiesOnly yes