- Notifications
You must be signed in to change notification settings - Fork9
Integrated ssh-agent for windows. (pageant compatible. openSSH ssh-agent etc ..)
License
masahide/OmniSSHAgent
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Unifies the chaotic ssh-agent state under Windows.
On Windows, there are multiple communication methods for SSH agents, leading to complexity in usage and configuration. The following diagram illustrates the current SSH agent communication landscape on Windows.
OmniSSHAgent simplifies this chaotic situation, as shown in the diagram below.
- Windows 11
- Microsoft Edge WebView2
- Pageant.exe (PuTTY) shared memory
- Unix domain socket for WSL2
- NamedPipe on Windows
- Unix domain socket for WSL1
- Unix domain socket for MSYS2 (Cygwin) (#1)
- Download
OmniSSHAgent-amd64-installer.exefromthe latest release, and run the installer. - If you are using the native Windows SSH agent, you will need to stop and disable it. Open PowerShell with administrator privileges and run the following commands:
Stop-Service ssh-agentSet-Service-StartupType Disabled ssh-agent
- Alternatively, you can do this through the GUI: open the Start menu, type "Services," and select the Services app.Once open, find the
OpenSSH Authentication Agentservice, setService StatustoStop, andStartup TypetoDisabled.
If you are usingPuTTY Pageant, stop it.
Launch
OmniSSHAgent.exeby double-clicking it.Press the
Open new filebutton to add a private key file, or use thessh-addcommand orKeePassXC to add your private key.
OmniSSHAgent does not have an installer to register itself for startup automatically. To add it manually:
- Press the Windows logo key + R, type
shell:startup, and click OK. This opens the Startup folder. - Copy and paste a shortcut to
OmniSSHAgent.exeinto the Startup folder.
Choose the instructions for your preferred shell below. If your shell is not listed, you can convert the Bash script syntax and submit a pull request to add it to the repository.
- Downloadubuntu.wsl2-ssh-agent-proxy.sh using the following command:
mkdir -p$HOME/wsl2-ssh-agent-proxycurl -sL https://raw.githubusercontent.com/masahide/OmniSSHAgent/refs/heads/main/hack/ubuntu.wsl2-ssh-agent-proxy.sh -o$HOME/wsl2-ssh-agent-proxy/ubuntu.wsl2-ssh-agent-proxy.sh
- Add the following line to
~/.bashrc,~/.zshrc, or the appropriate file for your shell:
source$HOME/wsl2-ssh-agent-proxy/ubuntu.wsl2-ssh-agent-proxy.sh
- Downloadubuntu.wsl2-ssh-agent-proxy.fish using the following command:
mkdir-p$HOME/wsl2-ssh-agent-proxycurl-sL https://raw.githubusercontent.com/masahide/OmniSSHAgent/refs/heads/main/hack/ubuntu.wsl2-ssh-agent-proxy.fish-o$HOME/wsl2-ssh-agent-proxy/ubuntu.wsl2-ssh-agent-proxy.fish
- Add the following line to
~/.config/fish/config.fish:
.$HOME/wsl2-ssh-agent-proxy/ubuntu.wsl2-ssh-agent-proxy.fishSetting up a Unix domain socket in the Ubuntu environment:
Check the setting for
Unix domain socket file path (WSL1)in OmniSSHAgent.For example, if the path is set as follows (UserNamewill vary based on your environment):C:\Users\<UserName>\OmniSSHAgent.sockThe WSL1 path would be/mnt/c/Users/<UserName>/OmniSSHAgent.sock.Add the following line to
~/.bashrc:
export SSH_AUTH_SOCK=/mnt/c/Users/<UserName>/OmniSSHAgent.sock
Check the setting for
Cygwin Unix domain socket file path (MSYS2)in OmniSSHAgent.- For example, if the path is (
UserNamewill vary based on your environment): C:\Users\<UserName>\OmniSSHCygwin.sock- The Cygwin path would be
/mnt/c/Users/<UserName>/OmniSSHCygwin.sock.
- For example, if the path is (
To set the
SSH_AUTH_SOCKvariable:- On the Windows taskbar, right-click the Windows icon and select System.
- In the Settings window, under Related Settings, click Advanced system settings.
- On the Advanced tab, click Environment Variables.
- In
User variables, clickNewto create a new environment variable:
Variable name: SSH_AUTH_SOCKVariable value: /mnt/c/Users/<UserName>/OmniSSHAgent.sockThis mode uses theOpenSSH ssh-agent NamedPipe as a backend. It can also be used with1Password’s ssh-agent function, as shown in the diagram below.
By enabling"Proxy mode for OpenSSH agent (also compatible with 1Password)" in the configuration, OmniSSHAgent functions as a proxy for Windows OpenSSH's NamedPipe SSH agent.
This mode also works with the 1Password key-agent.
Note: When "Proxy mode for OpenSSH agent (also compatible with 1Password)" is enabled, OmniSSHAgent operates solely as a proxy, and private keys cannot be added directly to it.
- PuTTY private key file (.ppk)
- OpenSSH format
- RSA
- ECDSA
- ED25519
(DSA, ECDSA-SK, ED25519-SK are not supported)
Passphrases are stored in theWindows Credential Manager.
About
Integrated ssh-agent for windows. (pageant compatible. openSSH ssh-agent etc ..)
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.

