secsh-add, ssh-add

adds RSA or DSA identities to the authentication agent 

Command


SYNOPSIS

secsh-add [-cdDklLxX] [-t life] file...

secsh-add -s reader

secsh-add -e reader

ssh-add [-clLdDxX] [-t life] file...

ssh-add -s reader

ssh-add -e reader


DESCRIPTION

secsh-add adds private key identities to the authentication agent, secsh-agent. When run without arguments, it adds the files $USERPROFILE/.ssh/id_rsa, $USERPROFILE/.ssh/id_dsa, $USERPROFILE/.ssh/id_ecdsa, and $USERPROFILE/.ssh/id_ed25519, and $USERPROFILE/.ssh/identity. After loading a private key, secsh-add will try to load corresponding certificate information from the filename obtained by appending -cert.pub to the name of the private key file. Alternative file names can be given on the command line.

If any file requires a passphrase, secsh-add asks for the passphrase from the user. The passphrase is read from the user's tty. secsh-add retries the last passphrase if multiple identity files are given.

The authentication agent must be running and must be an ancestor of the current process for secsh-add to work.

You can also call secsh-add as ssh-add.

Options

-c 

Indicates that added identities should be subject to confirmation before being used for authentication. Confirmation is performed by the SSH_ASKPASS program mentioned below. Successful confirmation is signaled by a zero exit status from the SSH_ASKPASS program, rather than text entered into the requester.

-d 

Instead of adding identities, removes identities from the agent. When secsh-add is run without arguments, the keys for the default identities and their corresponding certificates will be removed. Otherwise, the argument list is interpreted as a list of paths to public key files to specify keys and certificates to be removed from the agent. When no public key is found at a given path, secsh_add appends .pub and retries.

-D 

Deletes all identities from the agent.

-e reader 

Removes key in smartcard reader.

-k 

When loading keys into or deleting keys from the agent, process plain private keys only and skip certificates.

-L 

Lists public key parameters of all identities currently represented by the agent.

-l 

Lists fingerprints of all identities currently represented by the agent.

-s reader 

Adds key in smartcard reader.

-t life 

Sets a maximum lifetime when adding identities to an agent. The lifetime may be specified in seconds or in a time format specified in secshd.

-X 

Unlocks the agent.

-x 

Locks the agent with a password.


FILES

$USERPROFILE/.ssh/identity 

Contains the protocol version 1 RSA authentication identity of the user. This file should not be readable by anyone but the user. Note that secsh-add ignores this file if it is accessible by others. It is possible to specify a passphrase when generating the key; that passphrase will be used to encrypt the private part of this file. This is the default file added by secsh-add when no other files have been specified.

$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_ed25519 

Contains the protocol version 2 ED25519 authentication identity of the user.

$USERPROFILE/.ssh/id_rsa 

Contains the protocol version 2 RSA authentication identity of the user.


ENVIRONMENT VARIABLES

DISPLAY 
SSH_ASKPASS 

If secsh-add needs a passphrase, it will read the passphrase from the current terminal if it was run from a terminal. If secsh-add does not have a terminal associated with it but DISPLAY and SSH_ASKPASS are set, it will execute the program specified by SSH_ASKPASS and open an X11 window to read the passphrase. This is particularly useful when calling secsh-add from a .Xsession or related script. (Note that on some machines it may be necessary to redirect the input from /dev/null to make this work.)


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 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.


NOTES

The secsh-add utility, by default, loads keys from the $USERPROFILE directory on 7/2008R2/8/2012/10/2016 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.


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-agent, secshd, secsh-keygen, secsh-keysign

PTC MKS Toolkit Connectivity Solutions Guide


PTC MKS Toolkit 10.1 patch 1 Documentation Build 2.