secsh-add, ssh-add

adds RSA or DSA identities to the authentication agent 

Command


SYNOPSIS

secsh-add [-clLdDxX] [-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 RSA or DSA identities to the authentication agent, secsh-agent. When run without arguments, it adds the file $USERPROFILE/.ssh/identity. 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 are removed. Otherwise, the argument list is interpreted as a list of paths to public key files and matching keys are 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.

-l 

Lists fingerprints of all identities currently represented by the agent.

-L 

Lists public key parameters 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 

Locks the agent with a password.

-X 

Unlocks the agent.


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_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 2000. Windows XP. Windows Server 2003. Windows Vista. Windows 7. Windows Server 2008.


NOTES

The secsh-add utility, by default, loads keys from the $USERPROFILE directory on Windows NT/2000/XP/2003/Vista/7/2008 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

MKS Toolkit for System Administrators
MKS Toolkit for Developers
MKS Toolkit for Interoperability
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
secsh, secsh-agent, secshd, secsh-keygen, secsh-keysign

MKS Toolkit Connectivity Solutions Guide


MKS Toolkit 9.3 Documentation Build 6.