paramiko.AgentKey

Package paramiko :: Class AgentKey |
[frames] | no frames]

# Class AgentKey

source code

    object --+
             |
          PKey --+
                 |
                AgentKey

Private key held in a local SSH agent. This type of key can be used for authenticating to a remote server (signing). Most other key operations work as expected.

Instance Methods
__init__(self, agent, blob) Create a new instance of this public key type. | source code
str |
__str__(self) Return a string of an SSH Message made up of the public part(s) of this key. | source code
str |
get_name(self) Return the name of this private key implementation. | source code
Message |
sign_ssh_data(self, randpool, data) Sign a blob of data with this private key, and return a Message representing an SSH signature message. | source code
Inherited from `PKey`: `__cmp__`, `can_sign`, `get_base64`, `get_bits`, `get_fingerprint`, `verify_ssh_sig`, `write_private_key`, `write_private_key_file` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Methods
Inherited from `PKey`: `from_private_key`, `from_private_key_file`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, agent, blob) (Constructor) | source code
Create a new instance of this public key type. If `msg` is given, the key's public part(s) will be filled in from the message. If `data` is given, the key's public part(s) will be filled in from the string. Parameters: `msg` - an optional SSH Message containing a public key of this type. `data` - an optional string containing a public key of this type Raises: `SSHException` - if a key cannot be created from the `data` or `msg` given, or no key was passed in. Overrides: object.__init__ (inherited documentation)

### __str__(self) (Informal representation operator) | source code
Return a string of an SSH Message made up of the public part(s) of this key. This string is suitable for passing to __init__ to re-create the key object later. Returns: str string representation of an SSH key message. Overrides: object.__str__ (inherited documentation)

### get_name(self) | source code
Return the name of this private key implementation. Returns: str name of this private key type, in SSH terminology (for example, `"ssh-rsa"`). Overrides: PKey.get_name (inherited documentation)

### sign_ssh_data(self, randpool, data) | source code
Sign a blob of data with this private key, and return a Message representing an SSH signature message. Parameters: `randpool` - a secure random number generator. `data` - the data to sign. Returns: Message an SSH signature message. Overrides: PKey.sign_ssh_data (inherited documentation)