> ## Content Index
> Fetch the complete content index at: https://sgpublic.xyz/llms.txt
> Use this file to discover other available public pages before exploring further.

# WSL 中使用 Bitwarden SSH-Agent
- URL: https://sgpublic.xyz/p/2025/07/6aac9cb1810a480001533613/
- Published: 2025-07-12T10:45:42.000Z
- Updated: 2026-09-18T04:59:25.000Z
- Author: Haven Madray
- Tags: 桌面与终端, Windows/WSL, #wp-post

> 参考文章：[https://community.bitwarden.com/t/ssh-agent-native-support-for-ssh-agent-in-wsl/83831/5](https://community.bitwarden.com/t/ssh-agent-native-support-for-ssh-agent-in-wsl/83831/5?ref=sgpublic.xyz)

很简单，把这几句加到 `.bashrc` 文件的开头（或结尾，或直接 `/etc/profile.d/*.sh`，但这样使用 JetBrains Gateway 的时候就不能访问到了，其他不受影响）：

```
alias ssh='ssh.exe'
git config --global core.sshCommand "ssh.exe"
alias ssh-add='ssh-add.exe'
alias scp='scp.exe'
alias sftp='sftp.exe'

```