def get_remote_server_key(self):
if (not self.active) or (not self.initial_kex_done):<EOL><INDENT>raise SSHException("<STR_LIT>")<EOL><DEDENT>return self.host_key<EOL>
Return the host key of the server (in client mode).

.. note::
    Previously this call returned a tuple of ``(key type, key
    string)``. You can get the same effect by calling `.PKey.get_name`
    for the key type, and ``str(key)`` for the key string.

:raises: `.SSHException` -- if no session is currently active.

:return: public key (`.PKey`) of the remote server