GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Paramiko
  • Channel
  • Client
  • Message
  • Packetizer
  • Transport
  • Authentication modules
  • SSH agents
  • Host keys / known_hosts files
  • Key handling
  • Configuration
  • ProxyCommand support
  • Server implementation
  • SFTP

This view

  • Original page
  • New address

GeezerVison is showing docs.paramiko.org — Welcome to Paramiko’s documentation! — Paramiko documentation

Welcome to Paramiko’s documentation!¶

This site covers Paramiko’s usage & API documentation. For basic info on what Paramiko is, including its public changelog & how the project is maintained, please see the main project website.

API documentation¶

The high-level client API starts with creation of an SSHClient object. For more direct control, pass a socket (or socket-like object) to a Transport, and use start_server or start_client to negotiate with the remote host as either a server or client.

As a client, you are responsible for authenticating using a password or private key, and checking the server’s host key. (Key signature and verification is done by paramiko, but you will need to provide private keys and check that the content of a public key matches what you expected to see.)

As a server, you are responsible for deciding which users, passwords, and keys to allow, and what kind of channels to allow.

Once you have finished, either side may request flow-controlled channels to the other side, which are Python objects that act like sockets, but send and receive data over the encrypted session.

For details, please see the following tables of contents (which are organized by area of interest.)

Core SSH protocol classes¶

  • Channel
    • Channel
      • Channel.__init__()
      • Channel.__repr__()
      • Channel.active
      • Channel.chanid
      • Channel.close()
      • Channel.closed
      • Channel.exec_command()
      • Channel.exit_status_ready()
      • Channel.fileno()
      • Channel.get_id()
      • Channel.get_name()
      • Channel.get_pty()
      • Channel.get_transport()
      • Channel.getpeername()
      • Channel.gettimeout()
      • Channel.invoke_shell()
      • Channel.invoke_subsystem()
      • Channel.makefile()
      • Channel.makefile_stderr()
      • Channel.makefile_stdin()
      • Channel.recv()
      • Channel.recv_exit_status()
      • Channel.recv_ready()
      • Channel.recv_stderr()
      • Channel.recv_stderr_ready()
      • Channel.remote_chanid
      • Channel.request_forward_agent()
      • Channel.request_x11()
      • Channel.resize_pty()
      • Channel.send()
      • Channel.send_exit_status()
      • Channel.send_ready()
      • Channel.send_stderr()
      • Channel.sendall()
      • Channel.sendall_stderr()
      • Channel.set_combine_stderr()
      • Channel.set_environment_variable()
      • Channel.set_name()
      • Channel.setblocking()
      • Channel.settimeout()
      • Channel.shutdown()
      • Channel.shutdown_read()
      • Channel.shutdown_write()
      • Channel.transport
      • Channel.update_environment()
    • ChannelFile
      • ChannelFile.__init__()
      • ChannelFile.__repr__()
    • ChannelStderrFile
    • ChannelStdinFile
      • ChannelStdinFile.close()
    • open_only()
  • Client
    • SSHClient
      • SSHClient.__init__()
      • SSHClient.load_system_host_keys()
      • SSHClient.load_host_keys()
      • SSHClient.save_host_keys()
      • SSHClient.get_host_keys()
      • SSHClient.set_log_channel()
      • SSHClient.set_missing_host_key_policy()
      • SSHClient.connect()
      • SSHClient.close()
      • SSHClient.exec_command()
      • SSHClient.invoke_shell()
      • SSHClient.open_sftp()
      • SSHClient.get_transport()
    • MissingHostKeyPolicy
      • MissingHostKeyPolicy.missing_host_key()
      • MissingHostKeyPolicy.__weakref__
    • AutoAddPolicy
      • AutoAddPolicy.missing_host_key()
    • RejectPolicy
      • RejectPolicy.missing_host_key()
    • WarningPolicy
      • WarningPolicy.missing_host_key()
  • Message
    • Message
      • Message.__init__()
      • Message.__repr__()
      • Message.__weakref__
      • Message.add()
      • Message.add_adaptive_int()
      • Message.add_boolean()
      • Message.add_byte()
      • Message.add_bytes()
      • Message.add_int()
      • Message.add_int64()
      • Message.add_list()
      • Message.add_mpint()
      • Message.add_string()
      • Message.asbytes()
      • Message.get_adaptive_int()
      • Message.get_binary()
      • Message.get_boolean()
      • Message.get_byte()
      • Message.get_bytes()
      • Message.get_int()
      • Message.get_int64()
      • Message.get_list()
      • Message.get_mpint()
      • Message.get_remainder()
      • Message.get_so_far()
      • Message.get_string()
      • Message.get_text()
      • Message.rewind()
  • Packetizer
    • NeedRekeyException
      • NeedRekeyException.__weakref__
    • Packetizer
      • Packetizer.__init__()
      • Packetizer.__weakref__
      • Packetizer.complete_handshake()
      • Packetizer.handshake_timed_out()
      • Packetizer.need_rekey()
      • Packetizer.read_all()
      • Packetizer.read_message()
      • Packetizer.readline()
      • Packetizer.send_message()
      • Packetizer.set_inbound_cipher()
      • Packetizer.set_keepalive()
      • Packetizer.set_log()
      • Packetizer.set_outbound_cipher()
      • Packetizer.start_handshake()
  • Transport
    • Transport
      • Transport.__init__()
      • Transport.__repr__()
      • Transport.atfork()
      • Transport.get_security_options()
      • Transport.start_client()
      • Transport.start_server()
      • Transport.add_server_key()
      • Transport.get_server_key()
      • Transport.load_server_moduli()
      • Transport.close()
      • Transport.get_remote_server_key()
      • Transport.is_active()
      • Transport.open_session()
      • Transport.open_x11_channel()
      • Transport.open_forward_agent_channel()
      • Transport.open_forwarded_tcpip_channel()
      • Transport.open_channel()
      • Transport.request_port_forward()
      • Transport.cancel_port_forward()
      • Transport.open_sftp_client()
      • Transport.send_ignore()
      • Transport.renegotiate_keys()
      • Transport.set_keepalive()
      • Transport.global_request()
      • Transport.accept()
      • Transport.connect()
      • Transport.get_exception()
      • Transport.set_subsystem_handler()
      • Transport.is_authenticated()
      • Transport.get_username()
      • Transport.get_banner()
      • Transport.auth_none()
      • Transport.auth_password()
      • Transport.auth_publickey()
      • Transport.auth_interactive()
      • Transport.auth_interactive_dumb()
      • Transport.set_log_channel()
      • Transport.get_log_channel()
      • Transport.set_hexdump()
      • Transport.get_hexdump()
      • Transport.use_compression()
      • Transport.getpeername()
      • Transport.run()
    • SecurityOptions
      • SecurityOptions.__init__()
      • SecurityOptions.__repr__()
      • SecurityOptions.ciphers
      • SecurityOptions.digests
      • SecurityOptions.key_types
      • SecurityOptions.kex
      • SecurityOptions.compression
    • ServiceRequestingTransport
      • ServiceRequestingTransport.__init__()
      • ServiceRequestingTransport.auth_none()
      • ServiceRequestingTransport.auth_password()
      • ServiceRequestingTransport.auth_publickey()
      • ServiceRequestingTransport.auth_interactive()
      • ServiceRequestingTransport.auth_interactive_dumb()

Authentication & keys¶

  • Authentication modules
    • AuthSource
      • AuthSource.__init__()
      • AuthSource.__repr__()
      • AuthSource.authenticate()
      • AuthSource.__weakref__
    • NoneAuth
      • NoneAuth.authenticate()
    • Password
      • Password.__init__()
      • Password.__repr__()
      • Password.authenticate()
    • PrivateKey
      • PrivateKey.authenticate()
    • InMemoryPrivateKey
      • InMemoryPrivateKey.__init__()
      • InMemoryPrivateKey.__repr__()
    • OnDiskPrivateKey
      • OnDiskPrivateKey.__init__()
      • OnDiskPrivateKey.__repr__()
    • SourceResult
      • SourceResult.__getnewargs__()
      • SourceResult.__new__()
      • SourceResult.__repr__()
      • SourceResult.result
      • SourceResult.source
    • AuthResult
      • AuthResult.__init__()
      • AuthResult.__str__()
      • AuthResult.__weakref__
    • AuthFailure
      • AuthFailure.__init__()
      • AuthFailure.__str__()
    • AuthStrategy
      • AuthStrategy.__init__()
      • AuthStrategy.get_sources()
      • AuthStrategy.authenticate()
      • AuthStrategy.__weakref__
    • AuthHandler
      • AuthHandler.__init__()
      • AuthHandler.auth_interactive()
      • AuthHandler.__weakref__
    • AuthOnlyHandler
      • AuthOnlyHandler.send_auth_request()
      • AuthOnlyHandler.auth_interactive()
  • SSH agents
    • Agent
      • Agent.close()
      • Agent.get_keys()
    • AgentClientProxy
      • AgentClientProxy.close()
      • AgentClientProxy.connect()
    • AgentKey
      • AgentKey.algorithm_name
      • AgentKey.asbytes()
      • AgentKey.can_sign()
      • AgentKey.fingerprint
      • AgentKey.from_path()
      • AgentKey.from_private_key()
      • AgentKey.from_private_key_file()
      • AgentKey.from_type_string()
      • AgentKey.get_base64()
      • AgentKey.get_bits()
      • AgentKey.get_fingerprint()
      • AgentKey.get_name()
      • AgentKey.identifiers()
      • AgentKey.load_certificate()
      • AgentKey.sign_ssh_data()
      • AgentKey.verify_ssh_sig()
      • AgentKey.write_private_key()
      • AgentKey.write_private_key_file()
    • AgentLocalProxy
      • AgentLocalProxy.daemon
      • AgentLocalProxy.get_connection()
      • AgentLocalProxy.ident
      • AgentLocalProxy.is_alive()
      • AgentLocalProxy.join()
      • AgentLocalProxy.name
      • AgentLocalProxy.native_id
      • AgentLocalProxy.run()
      • AgentLocalProxy.start()
    • AgentProxyThread
      • AgentProxyThread.daemon
      • AgentProxyThread.ident
      • AgentProxyThread.is_alive()
      • AgentProxyThread.join()
      • AgentProxyThread.name
      • AgentProxyThread.native_id
      • AgentProxyThread.run()
      • AgentProxyThread.start()
    • AgentRemoteProxy
      • AgentRemoteProxy.daemon
      • AgentRemoteProxy.ident
      • AgentRemoteProxy.is_alive()
      • AgentRemoteProxy.join()
      • AgentRemoteProxy.name
      • AgentRemoteProxy.native_id
      • AgentRemoteProxy.run()
      • AgentRemoteProxy.start()
    • AgentRequestHandler
    • AgentServerProxy
      • AgentServerProxy.close()
      • AgentServerProxy.get_env()
      • AgentServerProxy.get_keys()
    • get_agent_connection()
  • Host keys / known_hosts files
    • HostKeys
      • HostKeys.__init__()
      • HostKeys.add()
      • HostKeys.load()
      • HostKeys.save()
      • HostKeys.lookup()
      • HostKeys.check()
      • HostKeys.clear()
      • HostKeys.keys()
      • HostKeys.values()
      • HostKeys.hash_host()
      • HostKeys.__weakref__
    • InvalidHostKey
      • InvalidHostKey.__init__()
      • InvalidHostKey.__weakref__
    • HostKeyEntry
      • HostKeyEntry.__init__()
      • HostKeyEntry.from_line()
      • HostKeyEntry.to_line()
      • HostKeyEntry.__repr__()
      • HostKeyEntry.__weakref__
  • Key handling
    • Parent key class
      • FileFormat
        • FileFormat.__getnewargs__()
        • FileFormat.__new__()
        • FileFormat.__repr__()
        • FileFormat.encoding
        • FileFormat.format
      • PKey
        • PKey.__eq__()
        • PKey.__hash__()
        • PKey.__init__()
        • PKey.__repr__()
        • PKey.__weakref__
        • PKey.algorithm_name
        • PKey.asbytes()
        • PKey.can_sign()
        • PKey.fingerprint
        • PKey.from_path()
        • PKey.from_private_key()
        • PKey.from_private_key_file()
        • PKey.from_type_string()
        • PKey.get_base64()
        • PKey.get_bits()
        • PKey.get_fingerprint()
        • PKey.get_name()
        • PKey.identifiers()
        • PKey.load_certificate()
        • PKey.sign_ssh_data()
        • PKey.verify_ssh_sig()
        • PKey.write_private_key()
        • PKey.write_private_key_file()
      • PublicBlob
        • PublicBlob.__eq__()
        • PublicBlob.__hash__
        • PublicBlob.__init__()
        • PublicBlob.__ne__()
        • PublicBlob.__str__()
        • PublicBlob.__weakref__
        • PublicBlob.from_file()
        • PublicBlob.from_message()
        • PublicBlob.from_string()
      • UnknownKeyType
        • UnknownKeyType.__init__()
        • UnknownKeyType.__str__()
        • UnknownKeyType.__weakref__
    • RSA
      • RSAKey
        • RSAKey.__init__()
        • RSAKey.__str__()
        • RSAKey.asbytes()
        • RSAKey.can_sign()
        • RSAKey.generate()
        • RSAKey.get_bits()
        • RSAKey.get_name()
        • RSAKey.identifiers()
        • RSAKey.sign_ssh_data()
        • RSAKey.verify_ssh_sig()
    • ECDSA
      • ECDSAKey
        • ECDSAKey.__init__()
        • ECDSAKey.__str__()
        • ECDSAKey.asbytes()
        • ECDSAKey.can_sign()
        • ECDSAKey.generate()
        • ECDSAKey.get_bits()
        • ECDSAKey.get_name()
        • ECDSAKey.identifiers()
        • ECDSAKey.sign_ssh_data()
        • ECDSAKey.verify_ssh_sig()
    • Ed25519
      • Ed25519Key
        • Ed25519Key.__init__()
        • Ed25519Key.asbytes()
        • Ed25519Key.can_sign()
        • Ed25519Key.get_bits()
        • Ed25519Key.get_name()
        • Ed25519Key.sign_ssh_data()
        • Ed25519Key.verify_ssh_sig()

Other primary functions¶

  • Configuration
    • Keywords currently supported
      • Expansion tokens
    • config module API documentation
      • SSHConfig
        • SSHConfig.__init__()
        • SSHConfig.from_text()
        • SSHConfig.from_path()
        • SSHConfig.from_file()
        • SSHConfig.parse()
        • SSHConfig.lookup()
        • SSHConfig.canonicalize()
        • SSHConfig.get_hostnames()
        • SSHConfig.__weakref__
      • LazyFqdn
        • LazyFqdn.__init__()
        • LazyFqdn.__str__()
        • LazyFqdn.__weakref__
      • SSHConfigDict
        • SSHConfigDict.as_bool()
        • SSHConfigDict.__weakref__
        • SSHConfigDict.as_int()
  • ProxyCommand support
    • ProxyCommand
      • ProxyCommand.__init__()
      • ProxyCommand.recv()
      • ProxyCommand.send()
  • Server implementation
    • ServerInterface
      • ServerInterface.check_channel_request()
      • ServerInterface.get_allowed_auths()
      • ServerInterface.check_auth_none()
      • ServerInterface.check_auth_password()
      • ServerInterface.check_auth_publickey()
      • ServerInterface.check_auth_interactive()
      • ServerInterface.check_auth_interactive_response()
      • ServerInterface.check_port_forward_request()
      • ServerInterface.cancel_port_forward_request()
      • ServerInterface.check_global_request()
      • ServerInterface.check_channel_pty_request()
      • ServerInterface.check_channel_shell_request()
      • ServerInterface.check_channel_exec_request()
      • ServerInterface.check_channel_subsystem_request()
      • ServerInterface.check_channel_window_change_request()
      • ServerInterface.check_channel_x11_request()
      • ServerInterface.check_channel_forward_agent_request()
      • ServerInterface.check_channel_direct_tcpip_request()
      • ServerInterface.check_channel_env_request()
      • ServerInterface.get_banner()
      • ServerInterface.__weakref__
    • InteractiveQuery
      • InteractiveQuery.__init__()
      • InteractiveQuery.add_prompt()
      • InteractiveQuery.__weakref__
    • SubsystemHandler
      • SubsystemHandler.__init__()
      • SubsystemHandler.get_server()
      • SubsystemHandler.start_subsystem()
      • SubsystemHandler.finish_subsystem()
  • SFTP
    • SFTPError
      • SFTPError.__weakref__
    • int64
    • SFTP
    • SFTPClient
      • SFTPClient.__init__()
      • SFTPClient.chdir()
      • SFTPClient.chmod()
      • SFTPClient.chown()
      • SFTPClient.close()
      • SFTPClient.file()
      • SFTPClient.from_transport()
      • SFTPClient.get()
      • SFTPClient.get_channel()
      • SFTPClient.getcwd()
      • SFTPClient.getfo()
      • SFTPClient.listdir()
      • SFTPClient.listdir_attr()
      • SFTPClient.listdir_iter()
      • SFTPClient.lstat()
      • SFTPClient.mkdir()
      • SFTPClient.normalize()
      • SFTPClient.open()
      • SFTPClient.posix_rename()
      • SFTPClient.put()
      • SFTPClient.putfo()
      • SFTPClient.readlink()
      • SFTPClient.remove()
      • SFTPClient.rename()
      • SFTPClient.rmdir()
      • SFTPClient.stat()
      • SFTPClient.symlink()
      • SFTPClient.truncate()
      • SFTPClient.unlink()
      • SFTPClient.utime()
    • SFTPServer
      • SFTPServer.__init__()
      • SFTPServer.convert_errno()
      • SFTPServer.finish_subsystem()
      • SFTPServer.set_file_attr()
      • SFTPServer.start_subsystem()
    • SFTPAttributes
      • SFTPAttributes.__init__()
      • SFTPAttributes.__repr__()
      • SFTPAttributes.__str__()
      • SFTPAttributes.__weakref__
      • SFTPAttributes.from_stat()
    • SFTPFile
      • SFTPFile.check()
      • SFTPFile.chmod()
      • SFTPFile.chown()
      • SFTPFile.close()
      • SFTPFile.flush()
      • SFTPFile.gettimeout()
      • SFTPFile.prefetch()
      • SFTPFile.read()
      • SFTPFile.readable()
      • SFTPFile.readinto()
      • SFTPFile.readline()
      • SFTPFile.readlines()
      • SFTPFile.readv()
      • SFTPFile.seek()
      • SFTPFile.seekable()
      • SFTPFile.set_pipelined()
      • SFTPFile.setblocking()
      • SFTPFile.settimeout()
      • SFTPFile.stat()
      • SFTPFile.tell()
      • SFTPFile.truncate()
      • SFTPFile.utime()
      • SFTPFile.writable()
      • SFTPFile.write()
      • SFTPFile.writelines()
      • SFTPFile.xreadlines()
    • SFTPHandle
      • SFTPHandle.__init__()
      • SFTPHandle.chattr()
      • SFTPHandle.close()
      • SFTPHandle.read()
      • SFTPHandle.stat()
      • SFTPHandle.write()
    • SFTPServerInterface
      • SFTPServerInterface.__init__()
      • SFTPServerInterface.__weakref__
      • SFTPServerInterface.canonicalize()
      • SFTPServerInterface.chattr()
      • SFTPServerInterface.list_folder()
      • SFTPServerInterface.lstat()
      • SFTPServerInterface.mkdir()
      • SFTPServerInterface.open()
      • SFTPServerInterface.posix_rename()
      • SFTPServerInterface.readlink()
      • SFTPServerInterface.remove()
      • SFTPServerInterface.rename()
      • SFTPServerInterface.rmdir()
      • SFTPServerInterface.session_ended()
      • SFTPServerInterface.session_started()
      • SFTPServerInterface.stat()
      • SFTPServerInterface.symlink()

Miscellany¶

  • Buffered pipes
    • BufferedPipe
      • BufferedPipe.__init__()
      • BufferedPipe.__len__()
      • BufferedPipe.__weakref__
      • BufferedPipe.close()
      • BufferedPipe.empty()
      • BufferedPipe.feed()
      • BufferedPipe.read()
      • BufferedPipe.read_ready()
      • BufferedPipe.set_event()
    • PipeTimeout
      • PipeTimeout.__weakref__
  • Buffered files
    • BufferedFile
      • BufferedFile.__init__()
      • BufferedFile.__iter__()
      • BufferedFile.__next__()
      • BufferedFile.close()
      • BufferedFile.flush()
      • BufferedFile.read()
      • BufferedFile.readable()
      • BufferedFile.readinto()
      • BufferedFile.readline()
      • BufferedFile.readlines()
      • BufferedFile.seek()
      • BufferedFile.seekable()
      • BufferedFile.tell()
      • BufferedFile.writable()
      • BufferedFile.write()
      • BufferedFile.writelines()
      • BufferedFile.xreadlines()
  • Cross-platform pipe implementations
    • WindowsPipe
      • WindowsPipe.__init__()
      • WindowsPipe.__weakref__
    • make_or_pipe()
  • Exceptions
    • AuthenticationException
    • BadAuthenticationType
      • BadAuthenticationType.__init__()
      • BadAuthenticationType.__str__()
    • BadHostKeyException
      • BadHostKeyException.__init__()
      • BadHostKeyException.__str__()
    • ChannelException
      • ChannelException.__init__()
      • ChannelException.__str__()
    • ConfigParseError
    • CouldNotCanonicalize
    • IncompatiblePeer
    • MessageOrderError
    • NoValidConnectionsError
      • NoValidConnectionsError.__init__()
      • NoValidConnectionsError.__reduce__()
      • NoValidConnectionsError.__weakref__
    • PartialAuthentication
      • PartialAuthentication.__init__()
      • PartialAuthentication.__str__()
    • PasswordRequiredException
    • ProxyCommandFailure
      • ProxyCommandFailure.__init__()
      • ProxyCommandFailure.__str__()
    • SSHException
      • SSHException.__weakref__
    • UnableToAuthenticate
©2026 Jeff Forcier. | Powered by Sphinx 7.2.6 & Alabaster 0.7.13 | Page source
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.