pax_global_header 0000666 0000000 0000000 00000000064 14750276263 0014526 g ustar 00root root 0000000 0000000 52 comment=ed8b09751ff20340332d4b1bb2b10e32aedc57ff
paramiko-3.5.1/ 0000775 0000000 0000000 00000000000 14750276263 0013337 5 ustar 00root root 0000000 0000000 paramiko-3.5.1/.bzrignore 0000664 0000000 0000000 00000000121 14750276263 0015333 0 ustar 00root root 0000000 0000000 *.pyc
./build
./paramiko.egg-info
./dist
./.project
./paramiko.tmproj
./test.log
paramiko-3.5.1/.circleci/ 0000775 0000000 0000000 00000000000 14750276263 0015172 5 ustar 00root root 0000000 0000000 paramiko-3.5.1/.circleci/config.yml 0000664 0000000 0000000 00000006407 14750276263 0017171 0 ustar 00root root 0000000 0000000 version: 2.1
orbs:
orb: invocations/orb@1.3.1
jobs:
sdist-test-suite:
executor:
name: orb/default
version: "3.6"
steps:
- orb/setup
- run: inv release.build --no-wheel --directory .
- run: |
cd dist
tar xzvf *.tar.gz
rm -v *.tar.gz
cd paramiko-*
pip install -e .
inv -e test
- orb/debug
kerberos:
executor:
name: orb/default
version: "3.6"
steps:
- orb/setup
# Required to actually see all of universe/multiverse :(
- run: sudo apt update
# System reqs to install/build gssapi c-ext & friends (who only
# appear to offer wheels for Windows)
- run: sudo apt install -y libkrb5-dev krb5-admin-server krb5-kdc
# Our gssapi-supporting flavor, eg gssapi, pyasn1 etc
- run: pip install -e '.[gssapi]'
# Test-only deps for Kerberos (if they are importable it triggers
# running the kerberos tests instead of skipping them)
- run: pip install k5test
# Do the thing, win the points!
- run: inv test
- orb/debug
# TODO: move to orb, rub on other projects too
spellcheck:
executor:
name: orb/default
version: "3.6"
steps:
- orb/setup
- run: codespell
- orb/debug
workflows:
main:
jobs:
# The basics
- orb/lint:
name: Lint
- orb/format:
name: Style check
- spellcheck:
name: Spellcheck
# Main test run, w/ coverage, and latest-supported cryptography
- orb/coverage:
name: Test
# Non-coverage runs w/ other crypto versions.
# (Phrased as 2-dimensional matrix but 3.6 only for now to save credits)
- orb/test:
name: Test << matrix.version >> w/ << matrix.pip-overrides >>
matrix:
parameters:
version: ["3.6"]
# TODO: I don't see a nicer way to do this that doesn't require
# making the orb know too much about its client code...
# TODO: the upper end of this needs to change and/or grow more
# cells, periodically
# TODO: see if there's a non shite way to use bucketing here,
# somewhere between yaml, pip and bash all escapes get fucky
pip-overrides: ["cryptography==3.3.2", "cryptography==39.0.0"]
# Kerberos tests. Currently broken :(
#- kerberos:
# name: Test 3.6 w/ Kerberos support
# # No point testing k5 if base tests already fail
# requires: ["Test 3.6 (w/ coverage, latest crypto)"]
- orb/test-release:
name: Release test
# Ensure test suite is included in sdist & functions appropriately
- sdist-test-suite:
name: Test within sdist
requires:
- "Test"
- "Release test"
# Test other interpreters if main passed
- orb/test:
name: Test << matrix.version >>
requires: ["Test"]
matrix:
parameters:
version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
# Test doc building if main test suite passed (no real reason to spend
# all those credits if the main tests would also fail...)
- orb/docs:
name: "Docs"
requires: ["Test"]
paramiko-3.5.1/.codecov.yml 0000664 0000000 0000000 00000000050 14750276263 0015555 0 ustar 00root root 0000000 0000000 comment: false
coverage:
precision: 0
paramiko-3.5.1/.codespellrc 0000664 0000000 0000000 00000000620 14750276263 0015635 0 ustar 00root root 0000000 0000000 [codespell]
# Default ignores, plus built docs and static doc sources
skip = venvs,.venv,.git,build,*.egg-info,*.lock,*.js,*.css,docs
# Certain words AUTHOR feels strongly about, plus various proper names that are
# close enough to real words that they anger codespell. (NOTE: for some reason
# codespell wants the latter listed in all-lowercase...!)
ignore-words-list = keypair,flage,lew,welp,strat
paramiko-3.5.1/.coveragerc 0000664 0000000 0000000 00000000124 14750276263 0015455 0 ustar 00root root 0000000 0000000 [run]
branch = True
include =
paramiko/*
tests/*
omit = paramiko/_winapi.py
paramiko-3.5.1/.flake8 0000664 0000000 0000000 00000000622 14750276263 0014512 0 ustar 00root root 0000000 0000000 [flake8]
exclude = sites,.git,build,dist,demos
# NOTE: W503, E203 are concessions to black 18.0b5 and could be reinstated
# later if fixed on that end.
# NOTE: E722 seems to only have started popping up on move to flake8 3.6.0 from
# 2.4.0. Not sure why, bare excepts have been a (regrettable) thing forever...
ignore = E124,E125,E128,E261,E301,E302,E303,E402,E721,W503,E203,E722
max-line-length = 79
paramiko-3.5.1/.git-blame-ignore-revs 0000664 0000000 0000000 00000000066 14750276263 0017441 0 ustar 00root root 0000000 0000000 # blackening
7f2c35052183b400827d9949a68b41c90f90a32d
paramiko-3.5.1/.github/ 0000775 0000000 0000000 00000000000 14750276263 0014677 5 ustar 00root root 0000000 0000000 paramiko-3.5.1/.github/FUNDING.yml 0000664 0000000 0000000 00000000111 14750276263 0016505 0 ustar 00root root 0000000 0000000 # These are supported funding model platforms
tidelift: "pypi/paramiko"
paramiko-3.5.1/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 14750276263 0017062 5 ustar 00root root 0000000 0000000 paramiko-3.5.1/.github/ISSUE_TEMPLATE/10_support_request.yml 0000664 0000000 0000000 00000006112 14750276263 0023371 0 ustar 00root root 0000000 0000000 name: Support Request
description: |
Use this template when you're having trouble using paramiko.
title: "[SUPPORT] -
"
labels: ["Support"]
body:
- type: markdown
attributes:
value: |
Thanks for using paramiko! We're sorry you're having trouble making it work the way you want. Please provide the information below and describe the problem you're having and we'll do our best to help.
- type: dropdown
id: usage_posture
attributes:
label: Are you using paramiko as a client or server?
multiple: false
options:
- Client
- Server
- Both
- Not sure
validations:
required: true
- type: dropdown
id: features
attributes:
label: What feature(s) aren't working right?
description: Select as many as are relevant
multiple: true
options:
- SSH
- SFTP
- Keys/auth
- known_hosts
- sshconfig
- Exception handling
- Something else
validations:
required: true
- type: input
id: paramiko_version
attributes:
label: What version(s) of paramiko are you using?
description: |
Find out with `$ python -c "import paramiko; print(paramiko.__version__)"`
placeholder: |
Example: 3.1.0
validations:
required: true
- type: input
id: python_version
attributes:
label: What version(s) of Python are you using?
description: |
Find out with `$ python -V`
placeholder: |
Example: 3.11.3
validations:
required: true
- type: input
id: os_info
attributes:
label: What operating system and version are you using?
placeholder: |
Example: WSL on Windows 11; or MacOS Mojave; or Ubuntu 22.10
validations:
required: true
- type: input
id: server_info
attributes:
label: If you're connecting as a client, which SSH server are you connecting to?
description: |
Leave this blank if you're not sure.
placeholder: |
Example: OpenSSH x.y; or Teleport vNN
- type: input
id: integrated_tool
attributes:
label: If you're using paramiko as part of another tool, which tool/version?
placeholder: |
Examples: Fabric, Ansible, sftputil
- type: textarea
id: intended_use
attributes:
label: What are you trying to do with paramiko?
description: |
Please describe in words what you are trying to do.
validations:
required: true
- type: textarea
id: problem_details
attributes:
label: How are you trying to do it, and what's happening instead?
description: |
Include code snippets and a description of the expected output, and be as detailed as possible. If possible, try to reduce your code examples to a minimal example that reproduces the problem/behavior.
validations:
required: true
- type: textarea
id: more_info
attributes:
label: Anything else?
description: |
Please provide any additional information that might help us find a solution for you.
paramiko-3.5.1/.github/ISSUE_TEMPLATE/20_bug_report.yml 0000664 0000000 0000000 00000005705 14750276263 0022265 0 ustar 00root root 0000000 0000000 name: Bug Report
description: |
Use this template when paramiko appears to be doing something wrong.
title: "[BUG] - "
labels: ["Bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to file a bug report!
- type: dropdown
id: usage_posture
attributes:
label: Are you using paramiko as a client or server?
multiple: false
options:
- Client
- Server
- Both
- Exception handling
- Not sure
validations:
required: true
- type: dropdown
id: features
attributes:
label: What feature(s) aren't working right?
description: Select as many as are relevant
multiple: true
options:
- SSH
- SFTP
- Keys/auth
- known_hosts
- sshconfig
- Something else
validations:
required: true
- type: input
id: paramiko_version
attributes:
label: What version(s) of paramiko are you using?
description: |
Find out with `$ python -c "import paramiko; print(paramiko.__version__)"`
placeholder: |
Example: 3.1.0
validations:
required: true
- type: input
id: python_version
attributes:
label: What version(s) of Python are you using?
description: |
Find out with `$ python -V`
placeholder: |
Example: 3.11.3
validations:
required: true
- type: input
id: os_info
attributes:
label: What operating system and version are you using?
placeholder: |
Example: WSL on Windows 11; or MacOS Mojave; or Ubuntu 22.10
validations:
required: true
- type: input
id: server_info
attributes:
label: If you're connecting as a client, which SSH server are you connecting to?
description: |
Leave this blank if you're not sure.
placeholder: |
Example: OpenSSH x.y; or Teleport vNN
- type: input
id: integrated_tool
attributes:
label: If you're using paramiko as part of another tool, which tool/version?
placeholder: |
Examples: Fabric, Ansible, sftputil
- type: textarea
id: desired_behavior
attributes:
label: Expected/desired behavior
description: |
Please describe what you are trying to do with paramiko. Include code snippets and be as detailed as possible.
validations:
required: true
- type: textarea
id: actual_behavior
attributes:
label: Actual behavior
description: |
What is paramiko doing instead?
validations:
required: true
- type: textarea
id: repro
attributes:
label: How to reproduce
description: |
If possible, please provide a minimal code example that reproduces the bug.
- type: textarea
id: more_info
attributes:
label: Anything else?
description: |
Please provide any additional information that might help us find and fix the bug.
paramiko-3.5.1/.github/ISSUE_TEMPLATE/30_feature_request.yml 0000664 0000000 0000000 00000004013 14750276263 0023310 0 ustar 00root root 0000000 0000000 name: Feature Request
description: |
Use this template to request addition of a new paramiko feature.
title: "[FEAT] - "
labels: ["Feature"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to let us know what you'd like added to paramiko!
- type: dropdown
id: usage_posture
attributes:
label: Is this feature for paramiko acting as a client or a server?
multiple: false
options:
- Client
- Server
- Both
- Not sure
validations:
required: true
- type: dropdown
id: features
attributes:
label: What functionality does this feature request relate to?
description: Select as many as are relevant
multiple: true
options:
- SSH
- SFTP
- Keys/auth
- known_hosts
- sshconfig
- Exception handling
- Something else
validations:
required: true
- type: input
id: server_info
attributes:
label: For client-side features, does this relate to a specific type of SSH server?
description: |
Leave this blank if you're not sure, or if you're requesting a server-side feature.
placeholder: |
Example: OpenSSH x.y; or Teleport vNN
- type: input
id: integrated_tool
attributes:
label: If you're using paramiko as part of another tool, which tool/version?
placeholder: |
Examples: Fabric, Ansible, sftputil
- type: textarea
id: desired_behavior
attributes:
label: Desired behavior
description: |
Please describe what you you would like paramiko to be able to do. If possible, include pseudocode or mock code snippets to illustrate the desired behavior, and be as detailed as possible.
validations:
required: true
- type: textarea
id: more_info
attributes:
label: Anything else?
description: |
Please provide any additional information that would be helpful to provide context for your requested feature.
paramiko-3.5.1/.github/ISSUE_TEMPLATE/config.yml 0000664 0000000 0000000 00000000321 14750276263 0021046 0 ustar 00root root 0000000 0000000 blank_issues_enabled: true
contact_links:
- name: "Blank Issue Template"
url: https://github.com/paramiko/paramiko/issues/new
about: "Use this as a last resort, if none of the other issue types fit." paramiko-3.5.1/.gitignore 0000664 0000000 0000000 00000000175 14750276263 0015332 0 ustar 00root root 0000000 0000000 *.pyc
build/
dist/
.tox/
paramiko.egg-info/
docs/
demos/*.log
!sites/docs
_build
.coverage
.cache
.idea
coverage.xml
htmlcov
paramiko-3.5.1/Dockerfile.i386 0000664 0000000 0000000 00000000434 14750276263 0016022 0 ustar 00root root 0000000 0000000 # Convenience tool for testing 32-bit issues. This is NOT officially supported;
# it is purely a maintainer-facing artifact.
FROM --platform=i386 i386/alpine:3.17
RUN apk add openssl-dev python3-dev libffi-dev make cargo bash
RUN python3 -m venv env
RUN env/bin/pip install -U pip
paramiko-3.5.1/LICENSE 0000664 0000000 0000000 00000063504 14750276263 0014354 0 ustar 00root root 0000000 0000000 GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
Copyright (C)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
paramiko-3.5.1/MANIFEST.in 0000664 0000000 0000000 00000000320 14750276263 0015070 0 ustar 00root root 0000000 0000000 include LICENSE setup_helper.py pytest.ini
recursive-include docs *
recursive-include tests *.py *.key *.pub
recursive-include tests/configs *
recursive-include demos *.py *.key user_rsa_key user_rsa_key.pub
paramiko-3.5.1/README.rst 0000664 0000000 0000000 00000004470 14750276263 0015033 0 ustar 00root root 0000000 0000000 |version| |python| |license| |ci| |coverage|
.. |version| image:: https://img.shields.io/pypi/v/paramiko
:target: https://pypi.org/project/paramiko/
:alt: PyPI - Package Version
.. |python| image:: https://img.shields.io/pypi/pyversions/paramiko
:target: https://pypi.org/project/paramiko/
:alt: PyPI - Python Version
.. |license| image:: https://img.shields.io/pypi/l/paramiko
:target: https://github.com/paramiko/paramiko/blob/main/LICENSE
:alt: PyPI - License
.. |ci| image:: https://img.shields.io/circleci/build/github/paramiko/paramiko/main
:target: https://app.circleci.com/pipelines/github/paramiko/paramiko
:alt: CircleCI
.. |coverage| image:: https://img.shields.io/codecov/c/gh/paramiko/paramiko
:target: https://app.codecov.io/gh/paramiko/paramiko
:alt: Codecov
Welcome to Paramiko!
====================
Paramiko is a pure-Python [#]_ (3.6+) implementation of the SSHv2 protocol
[#]_, providing both client and server functionality. It provides the
foundation for the high-level SSH library `Fabric `_,
which is what we recommend you use for common client use-cases such as running
remote shell commands or transferring files.
Direct use of Paramiko itself is only intended for users who need
advanced/low-level primitives or want to run an in-Python sshd.
For installation information, changelogs, FAQs and similar, please visit `our
main project website `_; for API details, see `the
versioned docs `_. Additionally, the project
maintainer keeps a `roadmap `_ on his
personal site.
.. [#]
Paramiko relies on `cryptography `_ for crypto
functionality, which makes use of C and Rust extensions but has many
precompiled options available. See `our installation page
`_ for details.
.. [#]
OpenSSH's RFC specification page is a fantastic resource and collection of
links that we won't bother replicating here:
https://www.openssh.com/specs.html
OpenSSH itself also happens to be our primary reference implementation:
when in doubt, we consult how they do things, unless there are good reasons
not to. There are always some gaps, but we do our best to reconcile them
when possible.
paramiko-3.5.1/SECURITY.md 0000664 0000000 0000000 00000000324 14750276263 0015127 0 ustar 00root root 0000000 0000000 # Security Policy
## Security contact information
To report a security vulnerability, please use the
[Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure.
paramiko-3.5.1/TODO 0000664 0000000 0000000 00000000317 14750276263 0014030 0 ustar 00root root 0000000 0000000 * Change license to BSD for v1.8 (obtain permission from Robey)
* Pending that, remove preamble from all files, ensure LICENSE is still correct
* Update version stuff: use an execfile'd paramiko/_version.py
paramiko-3.5.1/codecov.yml 0000664 0000000 0000000 00000000017 14750276263 0015502 0 ustar 00root root 0000000 0000000 comment: false
paramiko-3.5.1/demos/ 0000775 0000000 0000000 00000000000 14750276263 0014446 5 ustar 00root root 0000000 0000000 paramiko-3.5.1/demos/demo.py 0000775 0000000 0000000 00000012515 14750276263 0015753 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# Copyright (C) 2003-2007 Robey Pointer
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import base64
from binascii import hexlify
import getpass
import os
import select
import socket
import sys
import time
import traceback
from paramiko.py3compat import input
import paramiko
try:
import interactive
except ImportError:
from . import interactive
def agent_auth(transport, username):
"""
Attempt to authenticate to the given transport using any of the private
keys available from an SSH agent.
"""
agent = paramiko.Agent()
agent_keys = agent.get_keys()
if len(agent_keys) == 0:
return
for key in agent_keys:
print("Trying ssh-agent key %s" % hexlify(key.get_fingerprint()))
try:
transport.auth_publickey(username, key)
print("... success!")
return
except paramiko.SSHException:
print("... nope.")
def manual_auth(username, hostname):
default_auth = "p"
auth = input(
"Auth by (p)assword, (r)sa key, or (d)ss key? [%s] " % default_auth
)
if len(auth) == 0:
auth = default_auth
if auth == "r":
default_path = os.path.join(os.environ["HOME"], ".ssh", "id_rsa")
path = input("RSA key [%s]: " % default_path)
if len(path) == 0:
path = default_path
try:
key = paramiko.RSAKey.from_private_key_file(path)
except paramiko.PasswordRequiredException:
password = getpass.getpass("RSA key password: ")
key = paramiko.RSAKey.from_private_key_file(path, password)
t.auth_publickey(username, key)
elif auth == "d":
default_path = os.path.join(os.environ["HOME"], ".ssh", "id_dsa")
path = input("DSS key [%s]: " % default_path)
if len(path) == 0:
path = default_path
try:
key = paramiko.DSSKey.from_private_key_file(path)
except paramiko.PasswordRequiredException:
password = getpass.getpass("DSS key password: ")
key = paramiko.DSSKey.from_private_key_file(path, password)
t.auth_publickey(username, key)
else:
pw = getpass.getpass("Password for %s@%s: " % (username, hostname))
t.auth_password(username, pw)
# setup logging
paramiko.util.log_to_file("demo.log")
username = ""
if len(sys.argv) > 1:
hostname = sys.argv[1]
if hostname.find("@") >= 0:
username, hostname = hostname.split("@")
else:
hostname = input("Hostname: ")
if len(hostname) == 0:
print("*** Hostname required.")
sys.exit(1)
port = 22
if hostname.find(":") >= 0:
hostname, portstr = hostname.split(":")
port = int(portstr)
# now connect
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((hostname, port))
except Exception as e:
print("*** Connect failed: " + str(e))
traceback.print_exc()
sys.exit(1)
try:
t = paramiko.Transport(sock)
try:
t.start_client()
except paramiko.SSHException:
print("*** SSH negotiation failed.")
sys.exit(1)
try:
keys = paramiko.util.load_host_keys(
os.path.expanduser("~/.ssh/known_hosts")
)
except IOError:
try:
keys = paramiko.util.load_host_keys(
os.path.expanduser("~/ssh/known_hosts")
)
except IOError:
print("*** Unable to open host keys file")
keys = {}
# check server's host key -- this is important.
key = t.get_remote_server_key()
if hostname not in keys:
print("*** WARNING: Unknown host key!")
elif key.get_name() not in keys[hostname]:
print("*** WARNING: Unknown host key!")
elif keys[hostname][key.get_name()] != key:
print("*** WARNING: Host key has changed!!!")
sys.exit(1)
else:
print("*** Host key OK.")
# get username
if username == "":
default_username = getpass.getuser()
username = input("Username [%s]: " % default_username)
if len(username) == 0:
username = default_username
agent_auth(t, username)
if not t.is_authenticated():
manual_auth(username, hostname)
if not t.is_authenticated():
print("*** Authentication failed. :(")
t.close()
sys.exit(1)
chan = t.open_session()
chan.get_pty()
chan.invoke_shell()
print("*** Here we go!\n")
interactive.interactive_shell(chan)
chan.close()
t.close()
except Exception as e:
print("*** Caught exception: " + str(e.__class__) + ": " + str(e))
traceback.print_exc()
try:
t.close()
except:
pass
sys.exit(1)
paramiko-3.5.1/demos/demo_keygen.py 0000775 0000000 0000000 00000011231 14750276263 0017307 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# Copyright (C) 2010 Sofian Brabez
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys
from binascii import hexlify
from optparse import OptionParser
from paramiko import DSSKey
from paramiko import RSAKey
from paramiko.ssh_exception import SSHException
from paramiko.py3compat import u
usage = """
%prog [-v] [-b bits] -t type [-N new_passphrase] [-f output_keyfile]"""
default_values = {
"ktype": "dsa",
"bits": 1024,
"filename": "output",
"comment": "",
}
key_dispatch_table = {"dsa": DSSKey, "rsa": RSAKey}
def progress(arg=None):
if not arg:
sys.stdout.write("0%\x08\x08\x08 ")
sys.stdout.flush()
elif arg[0] == "p":
sys.stdout.write("25%\x08\x08\x08\x08 ")
sys.stdout.flush()
elif arg[0] == "h":
sys.stdout.write("50%\x08\x08\x08\x08 ")
sys.stdout.flush()
elif arg[0] == "x":
sys.stdout.write("75%\x08\x08\x08\x08 ")
sys.stdout.flush()
if __name__ == "__main__":
phrase = None
pfunc = None
parser = OptionParser(usage=usage)
parser.add_option(
"-t",
"--type",
type="string",
dest="ktype",
help="Specify type of key to create (dsa or rsa)",
metavar="ktype",
default=default_values["ktype"],
)
parser.add_option(
"-b",
"--bits",
type="int",
dest="bits",
help="Number of bits in the key to create",
metavar="bits",
default=default_values["bits"],
)
parser.add_option(
"-N",
"--new-passphrase",
dest="newphrase",
help="Provide new passphrase",
metavar="phrase",
)
parser.add_option(
"-P",
"--old-passphrase",
dest="oldphrase",
help="Provide old passphrase",
metavar="phrase",
)
parser.add_option(
"-f",
"--filename",
type="string",
dest="filename",
help="Filename of the key file",
metavar="filename",
default=default_values["filename"],
)
parser.add_option(
"-q", "--quiet", default=False, action="store_false", help="Quiet"
)
parser.add_option(
"-v", "--verbose", default=False, action="store_true", help="Verbose"
)
parser.add_option(
"-C",
"--comment",
type="string",
dest="comment",
help="Provide a new comment",
metavar="comment",
default=default_values["comment"],
)
(options, args) = parser.parse_args()
if len(sys.argv) == 1:
parser.print_help()
sys.exit(0)
for o in list(default_values.keys()):
globals()[o] = getattr(options, o, default_values[o.lower()])
if options.newphrase:
phrase = getattr(options, "newphrase")
if options.verbose:
pfunc = progress
sys.stdout.write(
"Generating priv/pub %s %d bits key pair (%s/%s.pub)..."
% (ktype, bits, filename, filename)
)
sys.stdout.flush()
if ktype == "dsa" and bits > 1024:
raise SSHException("DSA Keys must be 1024 bits")
if ktype not in key_dispatch_table:
raise SSHException(
"Unknown %s algorithm to generate keys pair" % ktype
)
# generating private key
prv = key_dispatch_table[ktype].generate(bits=bits, progress_func=pfunc)
prv.write_private_key_file(filename, password=phrase)
# generating public key
pub = key_dispatch_table[ktype](filename=filename, password=phrase)
with open("%s.pub" % filename, "w") as f:
f.write("%s %s" % (pub.get_name(), pub.get_base64()))
if options.comment:
f.write(" %s" % comment)
if options.verbose:
print("done.")
hash = u(hexlify(pub.get_fingerprint()))
print(
"Fingerprint: %d %s %s.pub (%s)"
% (
bits,
":".join([hash[i : 2 + i] for i in range(0, len(hash), 2)]),
filename,
ktype.upper(),
)
)
paramiko-3.5.1/demos/demo_server.py 0000664 0000000 0000000 00000013432 14750276263 0017335 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# Copyright (C) 2003-2007 Robey Pointer
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import base64
from binascii import hexlify
import os
import socket
import sys
import threading
import traceback
import paramiko
from paramiko.py3compat import b, u, decodebytes
# setup logging
paramiko.util.log_to_file("demo_server.log")
host_key = paramiko.RSAKey(filename="test_rsa.key")
# host_key = paramiko.DSSKey(filename='test_dss.key')
print("Read key: " + u(hexlify(host_key.get_fingerprint())))
class Server(paramiko.ServerInterface):
# 'data' is the output of base64.b64encode(key)
# (using the "user_rsa_key" files)
data = (
b"AAAAB3NzaC1yc2EAAAABIwAAAIEAyO4it3fHlmGZWJaGrfeHOVY7RWO3P9M7hp"
b"fAu7jJ2d7eothvfeuoRFtJwhUmZDluRdFyhFY/hFAh76PJKGAusIqIQKlkJxMC"
b"KDqIexkgHAfID/6mqvmnSJf0b5W8v5h2pI/stOSwTQ+pxVhwJ9ctYDhRSlF0iT"
b"UWT10hcuO4Ks8="
)
good_pub_key = paramiko.RSAKey(data=decodebytes(data))
def __init__(self):
self.event = threading.Event()
def check_channel_request(self, kind, chanid):
if kind == "session":
return paramiko.OPEN_SUCCEEDED
return paramiko.OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED
def check_auth_password(self, username, password):
if (username == "robey") and (password == "foo"):
return paramiko.AUTH_SUCCESSFUL
return paramiko.AUTH_FAILED
def check_auth_publickey(self, username, key):
print("Auth attempt with key: " + u(hexlify(key.get_fingerprint())))
if (username == "robey") and (key == self.good_pub_key):
return paramiko.AUTH_SUCCESSFUL
return paramiko.AUTH_FAILED
def check_auth_gssapi_with_mic(
self, username, gss_authenticated=paramiko.AUTH_FAILED, cc_file=None
):
"""
.. note::
We are just checking in `AuthHandler` that the given user is a
valid krb5 principal! We don't check if the krb5 principal is
allowed to log in on the server, because there is no way to do that
in python. So if you develop your own SSH server with paramiko for
a certain platform like Linux, you should call ``krb5_kuserok()`` in
your local kerberos library to make sure that the krb5_principal
has an account on the server and is allowed to log in as a user.
.. seealso::
`krb5_kuserok() man page
`_
"""
if gss_authenticated == paramiko.AUTH_SUCCESSFUL:
return paramiko.AUTH_SUCCESSFUL
return paramiko.AUTH_FAILED
def check_auth_gssapi_keyex(
self, username, gss_authenticated=paramiko.AUTH_FAILED, cc_file=None
):
if gss_authenticated == paramiko.AUTH_SUCCESSFUL:
return paramiko.AUTH_SUCCESSFUL
return paramiko.AUTH_FAILED
def enable_auth_gssapi(self):
return True
def get_allowed_auths(self, username):
return "gssapi-keyex,gssapi-with-mic,password,publickey"
def check_channel_shell_request(self, channel):
self.event.set()
return True
def check_channel_pty_request(
self, channel, term, width, height, pixelwidth, pixelheight, modes
):
return True
DoGSSAPIKeyExchange = True
# now connect
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.bind(("", 2200))
except Exception as e:
print("*** Bind failed: " + str(e))
traceback.print_exc()
sys.exit(1)
try:
sock.listen(100)
print("Listening for connection ...")
client, addr = sock.accept()
except Exception as e:
print("*** Listen/accept failed: " + str(e))
traceback.print_exc()
sys.exit(1)
print("Got a connection!")
try:
t = paramiko.Transport(client, gss_kex=DoGSSAPIKeyExchange)
t.set_gss_host(socket.getfqdn(""))
try:
t.load_server_moduli()
except:
print("(Failed to load moduli -- gex will be unsupported.)")
raise
t.add_server_key(host_key)
server = Server()
try:
t.start_server(server=server)
except paramiko.SSHException:
print("*** SSH negotiation failed.")
sys.exit(1)
# wait for auth
chan = t.accept(20)
if chan is None:
print("*** No channel.")
sys.exit(1)
print("Authenticated!")
server.event.wait(10)
if not server.event.is_set():
print("*** Client never asked for a shell.")
sys.exit(1)
chan.send("\r\n\r\nWelcome to my dorky little BBS!\r\n\r\n")
chan.send(
"We are on fire all the time! Hooray! Candy corn for everyone!\r\n"
)
chan.send("Happy birthday to Robot Dave!\r\n\r\n")
chan.send("Username: ")
f = chan.makefile("rU")
username = f.readline().strip("\r\n")
chan.send("\r\nI don't like you, " + username + ".\r\n")
chan.close()
except Exception as e:
print("*** Caught exception: " + str(e.__class__) + ": " + str(e))
traceback.print_exc()
try:
t.close()
except:
pass
sys.exit(1)
paramiko-3.5.1/demos/demo_sftp.py 0000664 0000000 0000000 00000007754 14750276263 0017015 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# Copyright (C) 2003-2007 Robey Pointer
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# based on code provided by raymond mosteller (thanks!)
import base64
import getpass
import os
import socket
import sys
import traceback
import paramiko
from paramiko.py3compat import input
# setup logging
paramiko.util.log_to_file("demo_sftp.log")
# Paramiko client configuration
UseGSSAPI = True # enable GSS-API / SSPI authentication
DoGSSAPIKeyExchange = True
Port = 22
# get hostname
username = ""
if len(sys.argv) > 1:
hostname = sys.argv[1]
if hostname.find("@") >= 0:
username, hostname = hostname.split("@")
else:
hostname = input("Hostname: ")
if len(hostname) == 0:
print("*** Hostname required.")
sys.exit(1)
if hostname.find(":") >= 0:
hostname, portstr = hostname.split(":")
Port = int(portstr)
# get username
if username == "":
default_username = getpass.getuser()
username = input("Username [%s]: " % default_username)
if len(username) == 0:
username = default_username
if not UseGSSAPI:
password = getpass.getpass("Password for %s@%s: " % (username, hostname))
else:
password = None
# get host key, if we know one
hostkeytype = None
hostkey = None
try:
host_keys = paramiko.util.load_host_keys(
os.path.expanduser("~/.ssh/known_hosts")
)
except IOError:
try:
# try ~/ssh/ too, because windows can't have a folder named ~/.ssh/
host_keys = paramiko.util.load_host_keys(
os.path.expanduser("~/ssh/known_hosts")
)
except IOError:
print("*** Unable to open host keys file")
host_keys = {}
if hostname in host_keys:
hostkeytype = host_keys[hostname].keys()[0]
hostkey = host_keys[hostname][hostkeytype]
print("Using host key of type %s" % hostkeytype)
# now, connect and use paramiko Transport to negotiate SSH2 across the connection
try:
t = paramiko.Transport((hostname, Port))
t.connect(
hostkey,
username,
password,
gss_host=socket.getfqdn(hostname),
gss_auth=UseGSSAPI,
gss_kex=DoGSSAPIKeyExchange,
)
sftp = paramiko.SFTPClient.from_transport(t)
# dirlist on remote host
dirlist = sftp.listdir(".")
print("Dirlist: %s" % dirlist)
# copy this demo onto the server
try:
sftp.mkdir("demo_sftp_folder")
except IOError:
print("(assuming demo_sftp_folder/ already exists)")
with sftp.open("demo_sftp_folder/README", "w") as f:
f.write("This was created by demo_sftp.py.\n")
with open("demo_sftp.py", "r") as f:
data = f.read()
sftp.open("demo_sftp_folder/demo_sftp.py", "w").write(data)
print("created demo_sftp_folder/ on the server")
# copy the README back here
with sftp.open("demo_sftp_folder/README", "r") as f:
data = f.read()
with open("README_demo_sftp", "w") as f:
f.write(data)
print("copied README back here")
# BETTER: use the get() and put() methods
sftp.put("demo_sftp.py", "demo_sftp_folder/demo_sftp.py")
sftp.get("demo_sftp_folder/README", "README_demo_sftp")
t.close()
except Exception as e:
print("*** Caught exception: %s: %s" % (e.__class__, e))
traceback.print_exc()
try:
t.close()
except:
pass
sys.exit(1)
paramiko-3.5.1/demos/demo_simple.py 0000664 0000000 0000000 00000006444 14750276263 0017325 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# Copyright (C) 2003-2007 Robey Pointer
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import base64
import getpass
import os
import socket
import sys
import traceback
from paramiko.py3compat import input
import paramiko
try:
import interactive
except ImportError:
from . import interactive
# setup logging
paramiko.util.log_to_file("demo_simple.log")
# Paramiko client configuration
UseGSSAPI = (
paramiko.GSS_AUTH_AVAILABLE
) # enable "gssapi-with-mic" authentication, if supported by your python installation
DoGSSAPIKeyExchange = (
paramiko.GSS_AUTH_AVAILABLE
) # enable "gssapi-kex" key exchange, if supported by your python installation
# UseGSSAPI = False
# DoGSSAPIKeyExchange = False
port = 22
# get hostname
username = ""
if len(sys.argv) > 1:
hostname = sys.argv[1]
if hostname.find("@") >= 0:
username, hostname = hostname.split("@")
else:
hostname = input("Hostname: ")
if len(hostname) == 0:
print("*** Hostname required.")
sys.exit(1)
if hostname.find(":") >= 0:
hostname, portstr = hostname.split(":")
port = int(portstr)
# get username
if username == "":
default_username = getpass.getuser()
username = input("Username [%s]: " % default_username)
if len(username) == 0:
username = default_username
if not UseGSSAPI and not DoGSSAPIKeyExchange:
password = getpass.getpass("Password for %s@%s: " % (username, hostname))
# now, connect and use paramiko Client to negotiate SSH2 across the connection
try:
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.WarningPolicy())
print("*** Connecting...")
if not UseGSSAPI and not DoGSSAPIKeyExchange:
client.connect(hostname, port, username, password)
else:
try:
client.connect(
hostname,
port,
username,
gss_auth=UseGSSAPI,
gss_kex=DoGSSAPIKeyExchange,
)
except Exception:
# traceback.print_exc()
password = getpass.getpass(
"Password for %s@%s: " % (username, hostname)
)
client.connect(hostname, port, username, password)
chan = client.invoke_shell()
print(repr(client.get_transport()))
print("*** Here we go!\n")
interactive.interactive_shell(chan)
chan.close()
client.close()
except Exception as e:
print("*** Caught exception: %s: %s" % (e.__class__, e))
traceback.print_exc()
try:
client.close()
except:
pass
sys.exit(1)
paramiko-3.5.1/demos/forward.py 0000664 0000000 0000000 00000016126 14750276263 0016472 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# Copyright (C) 2003-2007 Robey Pointer
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
Sample script showing how to do local port forwarding over paramiko.
This script connects to the requested SSH server and sets up local port
forwarding (the openssh -L option) from a local port through a tunneled
connection to a destination reachable from the SSH server machine.
"""
import getpass
import os
import socket
import select
try:
import SocketServer
except ImportError:
import socketserver as SocketServer
import sys
from optparse import OptionParser
import paramiko
SSH_PORT = 22
DEFAULT_PORT = 4000
g_verbose = True
class ForwardServer(SocketServer.ThreadingTCPServer):
daemon_threads = True
allow_reuse_address = True
class Handler(SocketServer.BaseRequestHandler):
def handle(self):
try:
chan = self.ssh_transport.open_channel(
"direct-tcpip",
(self.chain_host, self.chain_port),
self.request.getpeername(),
)
except Exception as e:
verbose(
"Incoming request to %s:%d failed: %s"
% (self.chain_host, self.chain_port, repr(e))
)
return
if chan is None:
verbose(
"Incoming request to %s:%d was rejected by the SSH server."
% (self.chain_host, self.chain_port)
)
return
verbose(
"Connected! Tunnel open %r -> %r -> %r"
% (
self.request.getpeername(),
chan.getpeername(),
(self.chain_host, self.chain_port),
)
)
while True:
r, w, x = select.select([self.request, chan], [], [])
if self.request in r:
data = self.request.recv(1024)
if len(data) == 0:
break
chan.send(data)
if chan in r:
data = chan.recv(1024)
if len(data) == 0:
break
self.request.send(data)
peername = self.request.getpeername()
chan.close()
self.request.close()
verbose("Tunnel closed from %r" % (peername,))
def forward_tunnel(local_port, remote_host, remote_port, transport):
# this is a little convoluted, but lets me configure things for the Handler
# object. (SocketServer doesn't give Handlers any way to access the outer
# server normally.)
class SubHander(Handler):
chain_host = remote_host
chain_port = remote_port
ssh_transport = transport
ForwardServer(("", local_port), SubHander).serve_forever()
def verbose(s):
if g_verbose:
print(s)
HELP = """\
Set up a forward tunnel across an SSH server, using paramiko. A local port
(given with -p) is forwarded across an SSH session to an address:port from
the SSH server. This is similar to the openssh -L option.
"""
def get_host_port(spec, default_port):
"parse 'hostname:22' into a host and port, with the port optional"
args = (spec.split(":", 1) + [default_port])[:2]
args[1] = int(args[1])
return args[0], args[1]
def parse_options():
global g_verbose
parser = OptionParser(
usage="usage: %prog [options] [:]",
version="%prog 1.0",
description=HELP,
)
parser.add_option(
"-q",
"--quiet",
action="store_false",
dest="verbose",
default=True,
help="squelch all informational output",
)
parser.add_option(
"-p",
"--local-port",
action="store",
type="int",
dest="port",
default=DEFAULT_PORT,
help="local port to forward (default: %d)" % DEFAULT_PORT,
)
parser.add_option(
"-u",
"--user",
action="store",
type="string",
dest="user",
default=getpass.getuser(),
help="username for SSH authentication (default: %s)"
% getpass.getuser(),
)
parser.add_option(
"-K",
"--key",
action="store",
type="string",
dest="keyfile",
default=None,
help="private key file to use for SSH authentication",
)
parser.add_option(
"",
"--no-key",
action="store_false",
dest="look_for_keys",
default=True,
help="don't look for or use a private key file",
)
parser.add_option(
"-P",
"--password",
action="store_true",
dest="readpass",
default=False,
help="read password (for key or password auth) from stdin",
)
parser.add_option(
"-r",
"--remote",
action="store",
type="string",
dest="remote",
default=None,
metavar="host:port",
help="remote host and port to forward to",
)
options, args = parser.parse_args()
if len(args) != 1:
parser.error("Incorrect number of arguments.")
if options.remote is None:
parser.error("Remote address required (-r).")
g_verbose = options.verbose
server_host, server_port = get_host_port(args[0], SSH_PORT)
remote_host, remote_port = get_host_port(options.remote, SSH_PORT)
return options, (server_host, server_port), (remote_host, remote_port)
def main():
options, server, remote = parse_options()
password = None
if options.readpass:
password = getpass.getpass("Enter SSH password: ")
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.WarningPolicy())
verbose("Connecting to ssh host %s:%d ..." % (server[0], server[1]))
try:
client.connect(
server[0],
server[1],
username=options.user,
key_filename=options.keyfile,
look_for_keys=options.look_for_keys,
password=password,
)
except Exception as e:
print("*** Failed to connect to %s:%d: %r" % (server[0], server[1], e))
sys.exit(1)
verbose(
"Now forwarding port %d to %s:%d ..."
% (options.port, remote[0], remote[1])
)
try:
forward_tunnel(
options.port, remote[0], remote[1], client.get_transport()
)
except KeyboardInterrupt:
print("C-c: Port forwarding stopped.")
sys.exit(0)
if __name__ == "__main__":
main()
paramiko-3.5.1/demos/interactive.py 0000664 0000000 0000000 00000005334 14750276263 0017342 0 ustar 00root root 0000000 0000000 # Copyright (C) 2003-2007 Robey Pointer
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import socket
import sys
from paramiko.py3compat import u
# windows does not have termios...
try:
import termios
import tty
has_termios = True
except ImportError:
has_termios = False
def interactive_shell(chan):
if has_termios:
posix_shell(chan)
else:
windows_shell(chan)
def posix_shell(chan):
import select
oldtty = termios.tcgetattr(sys.stdin)
try:
tty.setraw(sys.stdin.fileno())
tty.setcbreak(sys.stdin.fileno())
chan.settimeout(0.0)
while True:
r, w, e = select.select([chan, sys.stdin], [], [])
if chan in r:
try:
x = u(chan.recv(1024))
if len(x) == 0:
sys.stdout.write("\r\n*** EOF\r\n")
break
sys.stdout.write(x)
sys.stdout.flush()
except socket.timeout:
pass
if sys.stdin in r:
x = sys.stdin.read(1)
if len(x) == 0:
break
chan.send(x)
finally:
termios.tcsetattr(sys.stdin, termios.TCSADRAIN, oldtty)
# thanks to Mike Looijmans for this code
def windows_shell(chan):
import threading
sys.stdout.write(
"Line-buffered terminal emulation. Press F6 or ^Z to send EOF.\r\n\r\n"
)
def writeall(sock):
while True:
data = sock.recv(256)
if not data:
sys.stdout.write("\r\n*** EOF ***\r\n\r\n")
sys.stdout.flush()
break
sys.stdout.write(data)
sys.stdout.flush()
writer = threading.Thread(target=writeall, args=(chan,))
writer.start()
try:
while True:
d = sys.stdin.read(1)
if not d:
break
chan.send(d)
except EOFError:
# user hit ^Z or F6
pass
paramiko-3.5.1/demos/rforward.py 0000775 0000000 0000000 00000014337 14750276263 0016661 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# Copyright (C) 2008 Robey Pointer
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
Sample script showing how to do remote port forwarding over paramiko.
This script connects to the requested SSH server and sets up remote port
forwarding (the openssh -R option) from a remote port through a tunneled
connection to a destination reachable from the local machine.
"""
import getpass
import os
import socket
import select
import sys
import threading
from optparse import OptionParser
import paramiko
SSH_PORT = 22
DEFAULT_PORT = 4000
g_verbose = True
def handler(chan, host, port):
sock = socket.socket()
try:
sock.connect((host, port))
except Exception as e:
verbose("Forwarding request to %s:%d failed: %r" % (host, port, e))
return
verbose(
"Connected! Tunnel open %r -> %r -> %r"
% (chan.origin_addr, chan.getpeername(), (host, port))
)
while True:
r, w, x = select.select([sock, chan], [], [])
if sock in r:
data = sock.recv(1024)
if len(data) == 0:
break
chan.send(data)
if chan in r:
data = chan.recv(1024)
if len(data) == 0:
break
sock.send(data)
chan.close()
sock.close()
verbose("Tunnel closed from %r" % (chan.origin_addr,))
def reverse_forward_tunnel(server_port, remote_host, remote_port, transport):
transport.request_port_forward("", server_port)
while True:
chan = transport.accept(1000)
if chan is None:
continue
thr = threading.Thread(
target=handler, args=(chan, remote_host, remote_port)
)
thr.setDaemon(True)
thr.start()
def verbose(s):
if g_verbose:
print(s)
HELP = """\
Set up a reverse forwarding tunnel across an SSH server, using paramiko. A
port on the SSH server (given with -p) is forwarded across an SSH session
back to the local machine, and out to a remote site reachable from this
network. This is similar to the openssh -R option.
"""
def get_host_port(spec, default_port):
"parse 'hostname:22' into a host and port, with the port optional"
args = (spec.split(":", 1) + [default_port])[:2]
args[1] = int(args[1])
return args[0], args[1]
def parse_options():
global g_verbose
parser = OptionParser(
usage="usage: %prog [options] [:]",
version="%prog 1.0",
description=HELP,
)
parser.add_option(
"-q",
"--quiet",
action="store_false",
dest="verbose",
default=True,
help="squelch all informational output",
)
parser.add_option(
"-p",
"--remote-port",
action="store",
type="int",
dest="port",
default=DEFAULT_PORT,
help="port on server to forward (default: %d)" % DEFAULT_PORT,
)
parser.add_option(
"-u",
"--user",
action="store",
type="string",
dest="user",
default=getpass.getuser(),
help="username for SSH authentication (default: %s)"
% getpass.getuser(),
)
parser.add_option(
"-K",
"--key",
action="store",
type="string",
dest="keyfile",
default=None,
help="private key file to use for SSH authentication",
)
parser.add_option(
"",
"--no-key",
action="store_false",
dest="look_for_keys",
default=True,
help="don't look for or use a private key file",
)
parser.add_option(
"-P",
"--password",
action="store_true",
dest="readpass",
default=False,
help="read password (for key or password auth) from stdin",
)
parser.add_option(
"-r",
"--remote",
action="store",
type="string",
dest="remote",
default=None,
metavar="host:port",
help="remote host and port to forward to",
)
options, args = parser.parse_args()
if len(args) != 1:
parser.error("Incorrect number of arguments.")
if options.remote is None:
parser.error("Remote address required (-r).")
g_verbose = options.verbose
server_host, server_port = get_host_port(args[0], SSH_PORT)
remote_host, remote_port = get_host_port(options.remote, SSH_PORT)
return options, (server_host, server_port), (remote_host, remote_port)
def main():
options, server, remote = parse_options()
password = None
if options.readpass:
password = getpass.getpass("Enter SSH password: ")
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.WarningPolicy())
verbose("Connecting to ssh host %s:%d ..." % (server[0], server[1]))
try:
client.connect(
server[0],
server[1],
username=options.user,
key_filename=options.keyfile,
look_for_keys=options.look_for_keys,
password=password,
)
except Exception as e:
print("*** Failed to connect to %s:%d: %r" % (server[0], server[1], e))
sys.exit(1)
verbose(
"Now forwarding remote port %d to %s:%d ..."
% (options.port, remote[0], remote[1])
)
try:
reverse_forward_tunnel(
options.port, remote[0], remote[1], client.get_transport()
)
except KeyboardInterrupt:
print("C-c: Port forwarding stopped.")
sys.exit(0)
if __name__ == "__main__":
main()
paramiko-3.5.1/demos/test_rsa.key 0000664 0000000 0000000 00000001563 14750276263 0017011 0 ustar 00root root 0000000 0000000 -----BEGIN RSA PRIVATE KEY-----
MIICWgIBAAKBgQDTj1bqB4WmayWNPB+8jVSYpZYk80Ujvj680pOTh2bORBjbIAyz
oWGW+GUjzKxTiiPvVmxFgx5wdsFvF03v34lEVVhMpouqPAYQ15N37K/ir5XY+9m/
d8ufMCkjeXsQkKqFbAlQcnWMCRnOoPHS3I4vi6hmnDDeeYTSRvfLbW0fhwIBIwKB
gBIiOqZYaoqbeD9OS9z2K9KR2atlTxGxOJPXiP4ESqP3NVScWNwyZ3NXHpyrJLa0
EbVtzsQhLn6rF+TzXnOlcipFvjsem3iYzCpuChfGQ6SovTcOjHV9z+hnpXvQ/fon
soVRZY65wKnF7IAoUwTmJS9opqgrN6kRgCd3DASAMd1bAkEA96SBVWFt/fJBNJ9H
tYnBKZGw0VeHOYmVYbvMSstssn8un+pQpUm9vlG/bp7Oxd/m+b9KWEh2xPfv6zqU
avNwHwJBANqzGZa/EpzF4J8pGti7oIAPUIDGMtfIcmqNXVMckrmzQ2vTfqtkEZsA
4rE1IERRyiJQx6EJsz21wJmGV9WJQ5kCQQDwkS0uXqVdFzgHO6S++tjmjYcxwr3g
H0CoFYSgbddOT6miqRskOQF3DZVkJT3kyuBgU2zKygz52ukQZMqxCb1fAkASvuTv
qfpH87Qq5kQhNKdbbwbmd2NxlNabazPijWuphGTdW0VfJdWfklyS2Kr+iqrs/5wV
HhathJt636Eg7oIjAkA8ht3MQ+XSl9yIJIS8gVpbPxSw5OMfw0PjVE7tBdQruiSc
nvuQES5C9BMHjF39LZiGH1iLQy7FgdHyoP+eodI7
-----END RSA PRIVATE KEY-----
paramiko-3.5.1/demos/user_rsa_key 0000664 0000000 0000000 00000001567 14750276263 0017075 0 ustar 00root root 0000000 0000000 -----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDI7iK3d8eWYZlYloat94c5VjtFY7c/0zuGl8C7uMnZ3t6i2G99
66hEW0nCFSZkOW5F0XKEVj+EUCHvo8koYC6wiohAqWQnEwIoOoh7GSAcB8gP/qaq
+adIl/Rvlby/mHakj+y05LBND6nFWHAn1y1gOFFKUXSJNRZPXSFy47gqzwIBIwKB
gQCbANjz7q/pCXZLp1Hz6tYHqOvlEmjK1iabB1oqafrMpJ0eibUX/u+FMHq6StR5
M5413BaDWHokPdEJUnabfWXXR3SMlBUKrck0eAer1O8m78yxu3OEdpRk+znVo4DL
guMeCdJB/qcF0kEsx+Q8HP42MZU1oCmk3PbfXNFwaHbWuwJBAOQ/ry/hLD7AqB8x
DmCM82A9E59ICNNlHOhxpJoh6nrNTPCsBAEu/SmqrL8mS6gmbRKUaya5Lx1pkxj2
s/kWOokCQQDhXCcYXjjWiIfxhl6Rlgkk1vmI0l6785XSJNv4P7pXjGmShXfIzroh
S8uWK3tL0GELY7+UAKDTUEVjjQdGxYSXAkEA3bo1JzKCwJ3lJZ1ebGuqmADRO6UP
40xH977aadfN1mEI6cusHmgpISl0nG5YH7BMsvaT+bs1FUH8m+hXDzoqOwJBAK3Z
X/za+KV/REya2z0b+GzgWhkXUGUa/owrEBdHGriQ47osclkUgPUdNqcLmaDilAF4
1Z4PHPrI5RJIONAx+JECQQC/fChqjBgFpk6iJ+BOdSexQpgfxH/u/457W10Y43HR
soS+8btbHqjQkowQ/2NTlUfWvqIlfxs6ZbFsIp/HrhZL
-----END RSA PRIVATE KEY-----
paramiko-3.5.1/demos/user_rsa_key.pub 0000664 0000000 0000000 00000000345 14750276263 0017653 0 ustar 00root root 0000000 0000000 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAyO4it3fHlmGZWJaGrfeHOVY7RWO3P9M7hpfAu7jJ2d7eothvfeuoRFtJwhUmZDluRdFyhFY/hFAh76PJKGAusIqIQKlkJxMCKDqIexkgHAfID/6mqvmnSJf0b5W8v5h2pI/stOSwTQ+pxVhwJ9ctYDhRSlF0iTUWT10hcuO4Ks8= robey@ralph.lag.net
paramiko-3.5.1/dev-requirements.txt 0000664 0000000 0000000 00000001006 14750276263 0017374 0 ustar 00root root 0000000 0000000 # Invocations for common project tasks
invoke>=2.0
invocations>=3.2
# Testing!
pytest-relaxed>=2
# pytest-xdist for test dir watching and the inv guard task
pytest-xdist>=3
# Linting!
flake8>=4,<5
# Formatting!
black>=22.8,<22.9
# Spelling!
# TODO Python 3.7: newer codespell has upgraded lists
codespell>=2.2.1,<2.3
# Coverage!
coverage>=6.2,<7
# Documentation tools
alabaster==0.7.13
releases>=2.1
watchdog<2
# Debuggery
icecream>=2.1
# Self (sans GSS which is a pain to bother with most of the time)
-e ".[invoke]"
paramiko-3.5.1/images/ 0000775 0000000 0000000 00000000000 14750276263 0014604 5 ustar 00root root 0000000 0000000 paramiko-3.5.1/images/paramiko-banner.png 0000664 0000000 0000000 00000005505 14750276263 0020365 0 ustar 00root root 0000000 0000000 ‰PNG
IHDR X TúÒ gAMA ÖØÔOX2 tEXtSoftware Adobe ImageReadyqÉe<