Logo Search packages:      
Sourcecode: paramiko version File versions  Download package

def paramiko::transport::Transport::get_server_key (   self  ) 

Return the active host key, in server mode.  After negotiating with the
client, this method will return the negotiated host key.  If only one
type of host key was set with L{add_server_key}, that's the only key
that will ever be returned.  But in cases where you have set more than
one type of host key (for example, an RSA key and a DSS key), the key
type will be negotiated by the client, and this method will return the
key of the type agreed on.  If the host key has not been negotiated
yet, C{None} is returned.  In client mode, the behavior is undefined.

@return: host key of the type negotiated by the client, or C{None}.
@rtype: L{PKey <pkey.PKey>}

Definition at line 457 of file transport.py.

00457                             :
        """
        Return the active host key, in server mode.  After negotiating with the
        client, this method will return the negotiated host key.  If only one
        type of host key was set with L{add_server_key}, that's the only key
        that will ever be returned.  But in cases where you have set more than
        one type of host key (for example, an RSA key and a DSS key), the key
        type will be negotiated by the client, and this method will return the
        key of the type agreed on.  If the host key has not been negotiated
        yet, C{None} is returned.  In client mode, the behavior is undefined.

        @return: host key of the type negotiated by the client, or C{None}.
        @rtype: L{PKey <pkey.PKey>}
        """
        try:
            return self.server_key_dict[self.host_key_type]
        except KeyError:
            return None

    def load_server_moduli(filename=None):


Generated by  Doxygen 1.6.0   Back to index