Useful functions used by the rest of ssh.
|
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=DEBUG)
send ssh logs to a logfile, if they're not already going somewhere |
source code
|
|
|
|