Sunday, 25 October 2026

ssh-agent

ssh-agent is a background key manager that stores your decrypted SSH private keys in memory and signs authentication challenges on your behalf (via a Unix domain socket, see below for more detail on this), allowing passwordless SSH logins without exposing the keys themselves.

You can check if ssh-agent is running:

A) In Windows (PowerShell)

Get-Service ssh-agent

B) In Windows (Cmd.exe)

sc query ssh-agent

In both cases, if the agent is stopped you can start the agent.

C) In Linux

ps -ef | grep ssh-agent

ssh-agent does not use TCP (or other network-related ports) for communication. Instead it uses via a Unix domain-socket (local socket for IPC) specified by the SSH_AGENT_SOCK environment variable.

Technical note: SC (typed as sc in regular usage in CMD.EXE) is a command line program used for communicating with the Service Control Manager and services.  SC query - queries the status of a service, or enumerates the status for types of services.

No comments: