Free tools Windows power users keep installed
One-click scans. No signup required.
SSH_AUTH_SOCK tells an SSH client where to find the authentication agent’s Unix-domain socket. It is not a private-key path. To diagnose connection problems, check the variable in the exact shell or process where SSH fails, then use ssh-add -L to determine whether the agent is reachable and has identities loaded.
Start with the failing process
Run these checks in the same terminal, IDE, container, or other process context that launches the failing SSH command:
As an Amazon Associate I earn from qualifying purchases.
printf '%sn' "$SSH_AUTH_SOCK"shows the socket pathname available to that process. An empty result means the process has no socket path in its environment.- If a path is printed, run
ssh-add -L. It lists identities the agent exposes; if the agent cannot be contacted,ssh-adddocuments exit status 2 for that failure. - If the agent responds but the intended identity is missing, add it with
ssh-add path/to/key, then runssh-add -Lagain.
These checks distinguish three different conditions: no agent socket in the process environment, an unreachable agent, and a reachable agent without the needed identity. A printed path alone does not prove that the socket is live. See the OpenSSH ssh-add(1) manual and OpenSSH ssh-agent(1) manual.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →If SSH_AUTH_SOCK is not set
The failing process has not inherited a socket pathname. Check how the agent is started and how its environment reaches the shell or application that runs SSH. A value set in another terminal does not automatically appear in this one.
#1 Best Overall
- POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
OpenSSH documents two general approaches: run a child command under ssh-agent, or have the agent print environment-setting commands and evaluate them in the calling shell. For a Bourne-style shell, the documented form is:
eval "$(ssh-agent -s)"
Use syntax appropriate to your actual shell; that command is not universal shell syntax. If an agent is already running in another session, arrange for the failing process to receive that agent’s actual environment rather than guessing a socket pathname. Startup and session management vary by operating system and agent manager, so there is no single restart command that applies everywhere.
Rank #2
- POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
- WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
- FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
- MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
- PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
If the socket path exists but the agent cannot be contacted
Run ssh-add -L in the failing process’s environment. If it cannot reach the agent, verify that the socket belongs to a running agent and that the process can access it. The variable can contain a pathname even when the socket is stale or inaccessible.
Recommended Free Tools
Do not replace the value with a guessed path. Have the agent or session manager establish its real socket path and pass that environment to the process that needs it. Socket locations and startup behavior can differ across OpenSSH versions and platforms; consult the installed agent manual and identity-management manual.
Rank #3
- POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
- WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
- FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
- MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
- PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
If the agent responds but has no usable key
An agent can be reachable while exposing no identities: OpenSSH agents start with no private keys loaded. Use ssh-add -L to see what the agent currently offers. If the intended key is absent, add it and check again:
ssh-add path/to/key
On Apple systems, GitHub’s guide documents ssh-add --apple-use-keychain for Apple’s standard ssh-add. That option is implementation-specific, and older macOS releases used different flags; do not assume it works with every SSH implementation. See GitHub’s guide to SSH key passphrases.
Rank #4
- POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
If agent forwarding is not working on a remote host
Forwarding is a separate step from local key loading. Confirm first that the local agent exposes the intended identity. Then check the client’s forwarding setting, server policy, and the environment on the remote host.
Check the client setting
OpenSSH’s client default is ForwardAgent no. A host-specific entry in SSH configuration or a command-line option can change the effective setting. The client configuration accepts yes, no, a socket path, or an environment-variable name for ForwardAgent. Consult the OpenSSH ssh_config(5) manual for the syntax and behavior supported by your installed version.
Best Value
- Security Key : Protect your online accounts against unauthorized access by using FIDO2 and U2F authentication with T110. It's the world's most protective security key that works with windows, Mac OS, Linux as well as Chrome, Firefox, Edge and many other major browsers.
- Certified with the new FIDO2 standard, T110 provides the benefit of fast login and strong protection against phishing, account takeover as well as many other online attactks.
- Works with : Bank of America, Github, Google, Microsoft, DUO, Twitter, Facebook, Dropbox, Apple, ebay, BINANCE, mor and more.
- Fits USB-A port : Insert the T110 security key into the USB-A port of each service and log in conveniently with one touch
- For the driver download and user guide, please visit TrustKey Solutions Home support page.
Check server policy and the remote environment
The server’s AllowAgentForwarding setting controls whether it permits forwarding. Its documented default is yes, but the server’s actual configuration may override that default. See the OpenSSH sshd_config(5) manual.
After connecting, check SSH_AUTH_SOCK on the remote host. If the variable is empty there, the remote session does not have a forwarded socket path. GitHub’s SSH agent forwarding guide also recommends checking the remote environment and testing the target authentication again. For Git-over-SSH, make sure the repository remote uses an SSH URL: an HTTPS connection does not use the SSH agent.
Forwarding is a trust decision
Forwarding does not transmit the private-key file, but it lets a remote host request authentication operations from the local agent while the forwarded connection is available. OpenSSH warns that a user able to access the forwarded socket can use the identities loaded in the agent to authenticate. Forward only to hosts you trust, and leave forwarding disabled where it is not needed. The OpenSSH manual states: “Agent forwarding should be enabled with caution.”
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




