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

Class AgentKey

source code

object --+    
         |    
 pkey.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
 
asbytes(self)
Return a string of an SSH `.Message` made up of the public part(s) of this key.
source code
 
__str__(self)
str(x)
source code
 
get_name(self)
Return the name of this private key implementation.
source code
 
sign_ssh_data(self, data)
Sign a blob of data with this private key, and return a `.Message` representing an SSH signature message.
source code

Inherited from pkey.PKey: __cmp__, __eq__, 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.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.

:param .Message msg:
    an optional SSH `.Message` containing a public key of this type.
:param str 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)

asbytes(self)

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.

Overrides: pkey.PKey.asbytes
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

get_name(self)

source code 

Return the name of this private key implementation.

:return:
    name of this private key type, in SSH terminology, as a `str` (for
    example, ``"ssh-rsa"``).

Overrides: pkey.PKey.get_name
(inherited documentation)

sign_ssh_data(self, data)

source code 

Sign a blob of data with this private key, and return a `.Message` representing an SSH signature message.

:param str data: the data to sign. :return: an SSH signature `message <.Message>`.

Overrides: pkey.PKey.sign_ssh_data
(inherited documentation)