首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
爱意满满的作品展示区。
广告
0
V2EX
›
分享创造
Dev Container 下复用 WSL 中的 SSH Key
COW
·
8 小时 6 分钟前
· 246 次点击
从 WSL 终端 ssh 到局域网中其他 VM 机器很容易,在 Dev Container 里有点麻烦。
比如我要通过 Dev Container 里跑 ansible 控制多个 VM ,这里就需要复用 WSL 的 SSH key 。
手动写命令启动 ssh-agent 可以实现,但操作不够方便,这里写了个简单脚本,支持开机自启,有类似场景的自取。
https://github.com/kiddingbaby/ssh-agent-in-wsl/tree/main
dev container
WSL
SSH Key
1 条回复
•
2025-12-31 20:24:53 +08:00
1
craftsmanship
7 小时 59 分钟前 via Android
直接 bind mounts+post commands 就可以了
关于
·
帮助文档
·
自助推广系统
·
博客
·
API
·
FAQ
·
Solana
·
798 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms ·
UTC 20:23
·
PVG 04:23
·
LAX 12:23
·
JFK 15:23
♥ Do have faith in what you're doing.
❯