ssh-agent(1) on Solnix vs Linux and the BSDs
On Solnix, ssh-agent is the OpenSSH agent from pkgs.solnix.openssh, and it is what a default system runs. Its option set matches NetBSD's, and Linux's apart from -V. FreeBSD differs most: its page documents a different default socket location, -x, and no -T, -U or -u.
The manual pages
- Solnix: ssh-agent(1) from
pkgs.solnix.openssh - Linux: ssh-agent(1) openssh-10.5p1
- FreeBSD: ssh-agent(1) 15.1-RELEASE
- OpenBSD: ssh-agent(1) 8.0
- NetBSD: ssh-agent(1) 11.0
What Solnix runs
A default Solnix system runs the OpenSSH ssh-agent from pkgs.solnix.openssh, which is part of the base system packages. No other variants are shipped. The Solnix page documents no -V, -x or -A options.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD | default socket location | Solnix, like Linux, OpenBSD and NetBSD, creates the socket at a random path matching $HOME/.ssh/agent/s.*. The FreeBSD page gives the default as $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid>. A script that assumes the socket is under /tmp or $TMPDIR may break on Solnix. Source: Solnix ssh-agent(1) -a; FreeBSD ssh-agent(1) -a |
| FreeBSD | -T, -U, -u missing on FreeBSD | Solnix accepts -T (socket in a $TMPDIR/ssh-XXXXXXXXXX subdirectory), -U (do not clean up stale sockets) and -u (clean up stale sockets and exit). The FreeBSD page lists none of these in its synopsis or options.Source: Solnix ssh-agent(1) SYNOPSIS, -T, -U, -u; FreeBSD ssh-agent(1) SYNOPSIS |
| FreeBSD | -x | FreeBSD ssh-agent has -x, which exits after the last client has disconnected. Solnix has no -x. Its agent keeps running until it is killed with -k, exits because the command given on its command line ends, or is stopped by -u.Source: FreeBSD ssh-agent(1) -x; Solnix ssh-agent(1) SYNOPSIS and options |
| Linux, OpenBSD | -V | Linux and OpenBSD ssh-agent have -V, which prints the version number and exits. The Solnix page documents no -V, so a script should not use it to detect the version.Source: Linux ssh-agent(1) -V; OpenBSD ssh-agent(1) -V; Solnix ssh-agent(1) SYNOPSIS |
| OpenBSD | -A directory | OpenBSD ssh-agent has -A socket_path to choose the directory for the socket, with user: and shared: prefixes. In OpenBSD, -T, -A and -a are alternatives. Solnix has no ssh-agent -A. In ssh(1), -A is the agent-forwarding option.Source: OpenBSD ssh-agent(1) SYNOPSIS, -A; Solnix ssh-agent(1) SYNOPSIS |
| OpenBSD, NetBSD | socket activation | The Solnix page describes a third setup method, socket activation from a supervising process such as systemd. It is used with -d or -D, no -a, and LISTEN_FDS and LISTEN_PID set. The OpenBSD and NetBSD pages describe only two methods.Source: Solnix ssh-agent(1) DESCRIPTION (third way); OpenBSD ssh-agent(1) DESCRIPTION (two main ways); NetBSD ssh-agent(1) DESCRIPTION (two main ways) |
| Linux, OpenBSD, NetBSD | -P default provider path | The Solnix -P default is printed as "usr/lib*/*,/usr/local/lib*/*", with no leading slash on the first entry, and the FreeBSD page prints the same. Linux prints "/usr/lib*/*,/usr/local/lib*/*". OpenBSD and NetBSD print "/usr/lib/*,/usr/local/lib/*". Set -P explicitly if you rely on PKCS#11 or FIDO libraries.Source: Solnix ssh-agent(1) -P; Linux ssh-agent(1) -P; OpenBSD ssh-agent(1) -P; NetBSD ssh-agent(1) -P |
| Linux | same program as Linux | Apart from -V and the -P default path text, the Solnix page matches the Linux page (openssh-10.5p1) in synopsis, options, shell selection, lifetime and environment variables.Source: Solnix ssh-agent(1) SYNOPSIS, options; Linux ssh-agent(1) SYNOPSIS, options |
| NetBSD | same options as NetBSD | NetBSD's synopsis and options (-DdTU, -a, -E, -O, -P, -t, -k, -u) match Solnix's. The differences are only the missing socket-activation paragraph and the -P default path.Source: NetBSD ssh-agent(1) SYNOPSIS; Solnix ssh-agent(1) SYNOPSIS |
Standards
- POSIX: ssh-agent is not a POSIX.1-2024 utility.
Writing portable scripts
- Do not hard-code the agent socket path. Read SSH_AUTH_SOCK, because the default location is $HOME/.ssh/agent/s.* on Solnix but $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid> on FreeBSD.
- Avoid
-V,-xand-Ain scripts that must run on all four systems. Each exists on only some of them. Use-kto stop an agent.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.