Exceptions

exception paramiko.ssh_exception.AuthenticationException

Exception raised when authentication failed for some reason. It may be possible to retry with different credentials. (Other classes specify more specific reasons.)

New in version 1.6.

exception paramiko.ssh_exception.BadAuthenticationType(explanation, types)

Exception raised when an authentication type (like password) is used, but the server isn’t allowing that type. (It may only allow public-key, for example.)

New in version 1.1.

__init__(explanation, types)

Initialize self. See help(type(self)) for accurate signature.

__str__()

Return str(self).

exception paramiko.ssh_exception.BadHostKeyException(hostname, got_key, expected_key)

The host key given by the SSH server did not match what we were expecting.

Parameters:
  • hostname (str) – the hostname of the SSH server
  • got_key (PKey) – the host key presented by the server
  • expected_key (PKey) – the host key expected

New in version 1.6.

__init__(hostname, got_key, expected_key)

Initialize self. See help(type(self)) for accurate signature.

__str__()

Return str(self).

exception paramiko.ssh_exception.ChannelException(code, text)

Exception raised when an attempt to open a new Channel fails.

Parameters:code (int) – the error code returned by the server

New in version 1.6.

__init__(code, text)

Initialize self. See help(type(self)) for accurate signature.

__str__()

Return str(self).

exception paramiko.ssh_exception.PartialAuthentication(types)

An internal exception thrown in the case of partial authentication.

__init__(types)

Initialize self. See help(type(self)) for accurate signature.

__str__()

Return str(self).

exception paramiko.ssh_exception.PasswordRequiredException

Exception raised when a password is needed to unlock a private key file.

exception paramiko.ssh_exception.ProxyCommandFailure(command, error)

The “ProxyCommand” found in the .ssh/config file returned an error.

Parameters:
  • command (str) – The command line that is generating this exception.
  • error (str) – The error captured from the proxy command output.
__init__(command, error)

Initialize self. See help(type(self)) for accurate signature.

__str__()

Return str(self).

exception paramiko.ssh_exception.SSHException

Exception raised by failures in SSH2 protocol negotiation or logic errors.

__weakref__

list of weak references to the object (if defined)