Useful functions used by the rest of paramiko.
|
inflate_long(s,
always_positive=False)
turns a normalized byte string into a long-int (adapted from
Crypto.Util.number) |
source code
|
|
|
deflate_long(n,
add_sign_padding=True)
turns a long-int into a normalized byte string (adapted from
Crypto.Util.number) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string
|
generate_key_bytes(hashclass,
salt,
key,
nbytes)
Given a password, passphrase, or other human-source key, scramble it
through a secure hash into some keyworthy bytes. |
source code
|
|
dict(hostname, dict(keytype, PKey))
|
load_host_keys(filename)
Read a file of known SSH host keys, in the format used by openssh,
and return a compound dict of hostname -> keytype
-> PKey. |
source code
|
|
|
parse_ssh_config(file_obj)
Provided only as a backward-compatible wrapper around SSHConfig. |
source code
|
|
|
lookup_ssh_host_config(hostname,
config)
Provided only as a backward-compatible wrapper around SSHConfig. |
source code
|
|
|
|
|
|
|
log_to_file(filename,
level=10)
send paramiko logs to a logfile, if they're not already going
somewhere |
source code
|
|
|
|
|
AUTH_FAILED = 2
|
|
AUTH_PARTIALLY_SUCCESSFUL = 1
|
|
AUTH_SUCCESSFUL = 0
|
|
CONNECTION_FAILED_CODE = { 1: ' Administratively prohibited ' , 2: ...
|
|
CRITICAL = 50
|
|
DEBUG = 10
|
|
DISCONNECT_AUTH_CANCELLED_BY_USER = 13
|
|
DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE = 14
|
|
DISCONNECT_SERVICE_NOT_AVAILABLE = 7
|
|
ERROR = 40
|
|
INFO = 20
|
|
MSG_CHANNEL_CLOSE = 97
|
|
MSG_CHANNEL_DATA = 94
|
|
MSG_CHANNEL_EOF = 96
|
|
MSG_CHANNEL_EXTENDED_DATA = 95
|
|
MSG_CHANNEL_FAILURE = 100
|
|
MSG_CHANNEL_OPEN = 90
|
|
MSG_CHANNEL_OPEN_FAILURE = 92
|
|
MSG_CHANNEL_OPEN_SUCCESS = 91
|
|
MSG_CHANNEL_REQUEST = 98
|
|
MSG_CHANNEL_SUCCESS = 99
|
|
MSG_CHANNEL_WINDOW_ADJUST = 93
|
|
MSG_DEBUG = 4
|
|
MSG_DISCONNECT = 1
|
|
MSG_GLOBAL_REQUEST = 80
|
|
MSG_IGNORE = 2
|
|
MSG_KEXINIT = 20
|
|
MSG_NAMES = { 1: ' disconnect ' , 2: ' ignore ' , 3: ' unimplemented ' , ...
|
|
MSG_NEWKEYS = 21
|
|
MSG_REQUEST_FAILURE = 82
|
|
MSG_REQUEST_SUCCESS = 81
|
|
MSG_SERVICE_ACCEPT = 6
|
|
MSG_SERVICE_REQUEST = 5
|
|
MSG_UNIMPLEMENTED = 3
|
|
MSG_USERAUTH_BANNER = 53
|
|
MSG_USERAUTH_FAILURE = 51
|
|
MSG_USERAUTH_INFO_REQUEST = 60
|
|
MSG_USERAUTH_INFO_RESPONSE = 61
|
|
MSG_USERAUTH_PK_OK = 60
|
|
MSG_USERAUTH_REQUEST = 50
|
|
MSG_USERAUTH_SUCCESS = 52
|
|
OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED = 1
|
|
OPEN_FAILED_CONNECT_FAILED = 2
|
|
OPEN_FAILED_RESOURCE_SHORTAGE = 4
|
|
OPEN_FAILED_UNKNOWN_CHANNEL_TYPE = 3
|
|
OPEN_SUCCEEDED = 0
|
|
PY22 = False
|
|
WARNING = 30
|
|
randpool = StrongLockingRandomPool()
|