SYNOPSIS
secsh-agent
[
secsh-agent
[
secsh-agent
[
ssh-agent
[
ssh-agent
[
ssh-agent
[
DESCRIPTION
secsh-agent is a program to hold private keys used for public key authentication. Through use of environment variables, the agent can be located and automatically used for authentication when logging in to other machines using secsh.
There are two main ways to get an agent set up. The first is at the start of an X session, where all other windows or programs are started as children of the secsh-agent program. The agent starts a command under which its environment variables are exported, for example secsh-agent xterm & . When the command terminates, so does the agent.
The second method is used for a login session. When secsh-agent is started, it prints the shell commands required to set its environment variables, which in turn can be evaluated in the calling shell, for example eval `ssh-agent -s`.
In both cases, secsh looks at these environment variables and uses them to establish a connection to the agent.
The agent initially does not have any private keys. Keys are added using secsh-add or by secsh when AddKeysToAgent is set in ssh_config. Multiple identities may be stored in ssh-agent concurrently and secsh will automatically use them if present. secsh-add is also used to remove keys from ssh-agent and to query the keys that are held in one.
Connections to ssh-agent may be forwarded from further remote hosts using
the
Options
-a bind_address-
Binds the agent to the unix-domain socket bind address. The default is $TEMP/ssh-XXXXXXXXXX/agent.ppid.
-c -
Generates C-shell commands on stdout. This is the default if SHELL looks like it's a csh style of shell.
-D -
Foreground mode. When this option is specified, secsh-agent will not fork.
-d -
Enables debug mode. When this option is specified, secsh-agent will not fork.
-E fingerprint_hash-
Specifies the hash algorithm used when displaying key fingerprints. Valid options are: md5 and sha256. The default is sha256.
-k -
Kills the current agent (given by the SSH_AGENT_PID environment variable).
-O option-
Specify an option when starting ssh-agent. Currently two options are supported: allow-remote-pkcs11 and no-restrict-websafe.
The allow-remote-pkcs11 option allows clients of a forwarded ssh-agent to load PKCS#11 or FIDO provider libraries. By default only local clients may perform this operation. Note that signalling that an secsh-agent client is remote is performed by secsh, and use of other tools to forward access to the agent socket may circumvent this restriction.
The no-restrict-websafe option instructs ssh-agent to permit signatures using FIDO keys that might be web authentication requests. By default, ssh-agent refuses signature requests for FIDO keys where the key application string does not start with ssh: and when the data to be signed does not appear to be a secsh user authentication request or a secsh-keygen signature. The default behaviour prevents forwarded access to a FIDO key from also implicitly forwarding the ability to authenticate to websites.
-P allowed_providers-
Specify a pattern-list of acceptable paths for PKCS#11 provider and FIDO authenticator middleware shared libraries that may be used with the
-S or-s options to secsh-add. Libraries that do not match the pattern list will be refused. See PATTERNS in secsh for a description of pattern-list syntax. -s -
Generate Bourne shell commands on stdout. This is the default if SHELL does not look like it's a csh style of shell.
-t life-
sets a default value for the maximum lifetime of identities added to the agent. The lifetime may be specified in seconds or in a time format specified in sshd_config. A lifetime specified for an identity with secsh-add overrides this value. Without this option, the default maximum lifetime is forever.
- command args
-
If a command (and optional arguments) is given, this is executed as a subprocess of the agent. The agent exits automatically when the command given on the command line terminates.
ENVIRONMENT VARIABLES
- SSH_AGENT_PID
-
When secsh-agent starts, it stores the name of the agent's process ID (PID) in this variable.
- SSH_AUTH_SOCK
-
Identifies the path of a UNIX-domain socket used to communicate with the agent.
FILES
- $USERPROFILE/.ssh/id_dsa
-
Contains the protocol version 2 DSA authentication identity of the user.
- $USERPROFILE/.ssh/id_ecdsa
-
Contains the protocol version 2 ECDSA authentication identity of the user.
- $USERPROFILE/.ssh/id_ecdsa_sk
-
Contains the authenticator-hosted ECDSA authentication identity of the user.
- $USERPROFILE/.ssh/id_ed25519
-
Contains the protocol version 2 ED25519 authentication identity of the user.
- $USERPROFILE/.ssh/id_ed25519_sk
-
Contains the authenticator-hosted ED25519 authentication identity of the user.
- $USERPROFILE/.ssh/id_rsa
-
Contains the protocol version 2 RSA authentication identity of the user.
- $TMPDIR/ssh-XXXXXXXX/agent.<pid>
-
Unix-domain sockets used to contain the connection to the authentication agent. These sockets should only be readable by the owner. The sockets should get automatically removed when the agent exits.
AUTHORS
OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. Markus Friedl contributed the support for SSH protocol versions 1.5 and 2.0.
PORTABILITY
All UNIX systems. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022. Windows Server 2025.
NOTES
The secsh-add utility, by default, loads keys from the $USERPROFILE directory on 10/2016/2019/11/2022/2025 platforms instead of ~/. This was done because the ~/ directory might not be available for the case of a domain machine that cannot contact a domain controller. Note that the secure shell service continues to use the ~/.ssh directory to store configuration files.
The authentication agent only works when connecting to secure shell servers that are based upon OpenSSH. The agent does not work when connecting to ssh.com-based servers.
AVAILABILITY
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Commands:
- secsh, secsh-add, secshd, secsh-keygen, secsh-keysign
PTC MKS Toolkit Connectivity Solutions Guide
PTC MKS Toolkit 10.5 Documentation Build 40.