Commit Graph

18 Commits

Author SHA1 Message Date
Robey Pointer 65beaef76f [project @ robey@ralph.lag.net-20051204044921-ae847bf450372ff5]
add comments to demo and demo_simple explaining that they don't work on windows
2005-12-03 20:49:21 -08:00
Robey Pointer 01ca23cace [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-55]
fix the loading of known_hosts in the demos to work on winodws/cygwin
2005-08-17 15:54:29 +00:00
Robey Pointer 1a6ba349da [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-36]
move load_host_keys into util where others can use it
2005-07-14 02:19:13 +00:00
Robey Pointer ae18228d07 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-26]
new ssh agent support!  from john rochester.  added a bunch of docs to it, and changed demo.py to use an Agent if it finds a working key there.
2005-07-07 01:35:31 +00:00
Robey Pointer 29a5381ba1 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-162]
avoid os.environ['HOME'] in the demos
avoid using os.environ['HOME'], which will never work on windows, and
use os.path.expanduser() instead.  it's semi-moot because windows doesn't
have a standard location for ssh files, but i think paramiko should set a
good example anyway.
2005-04-18 00:11:34 +00:00
Robey Pointer fead211c5c [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-154]
even better 1.2 lapras
re-bump the version # to 1.2 (with a new date since i added more stuff).
add 2005 to the copyright date in a bunch of files.
2005-02-28 08:06:08 +00:00
Robey Pointer 2939b6936b [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-93]
switch Transport.connect() to using a Pkey object for the host key
i suddenly realized that passing "hostkeytype" and "hostkey" as strings to
Transport.connect() was pretty silly since i went to all the effort of making
a class specifically for holding keys.  so Transport.connect() now just takes
host-key argument: "hostkey" as a PKey object.

updated the demos to use PKey objects when reading the host key file, and to
use the new "hostkey" argument.
2004-10-18 04:54:27 +00:00
Robey Pointer 945a41dd3d [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-42]
support py22, more or less
add roger binns' patches for supporting python 2.2.  i hedged a bit on the
logging stuff and just added some trickery to let logging be stubbed out for
python 2.2.  this changed a lot of import statements but i managed to avoid
hacking at any of the existing logging.

socket timeouts are required for the threads to notice when they've been
deactivated.  worked around it by using the 'select' module on py22.

also fixed the sftp unit tests to cope with a password-protected private key.
2004-04-06 08:16:02 +00:00
Robey Pointer ed72847ad1 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-41]
make get_remote_server_key() return a PKey object
a good suggestion from roger binns: make get_remote_server_key() just return
a pkey object instead of a tuple of strings.  all the strings can be extracted
from the pkey object, as well as other potentially useful things.
2004-04-05 22:32:03 +00:00
Robey Pointer c6d5ba9c52 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-40]
add dss key generation too, and fix some bugs
added the ability to generate dss keys and write private dss key files,
similar to rsa.  in the process, fixed a couple of bugs with ber encoding
and writing password-encrypted key files.  the key has to be padded to the
iblock size of the cipher -- it's very difficult to determine how the others
do this, so i just add random bytes to the end.

fixed the simple demo to use Transport's (host, port) constructor for
simplicity, and fixed a bug where the standard demo's DSS login wouldn't
work.

also, move the common logfile setup crap into util so all the demos can just
call that one.
2004-04-05 19:36:40 +00:00
Robey Pointer 988c6abda0 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-20]
more docs, and password-protected key files can now be read
lots more documentation, some of it moved out of the README file, which is
now much smaller and less rambling.

repr(Transport) now reports the number of bits used in the cipher.

cleaned up BER to use util functions, and throw a proper exception (the new
BERException) on error.  it doesn't ever have to be a full BER decoder, but
it can at least comb its hair and tuck in its shirt.

lots of stuff added to PKey.read_private_key_file so it can try to decode
password-protected key files.  right now it only understands "DES-EDE3-CBC"
format, but this is the only format i've seen openssh make so far.  if the
key is password-protected, but no password was given, a new exception
(PasswordRequiredException) is raised so an outer layer can ask for a password
and try again.
2004-01-04 09:29:13 +00:00
Robey Pointer 3a8887a420 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-19]
renamed auth_key -> auth_publickey; more docs.
renamed Transport.auth_key to auth_publickey for consistency.  and lots more
documentation.
2003-12-31 06:31:43 +00:00
Robey Pointer 48c7d888a2 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-17]
lots more documentation, and added Transport.connect()
renamed demo_host_key to demo_rsa_key.  moved changelog to a separate file,
and indicated that future changelog entries should be fetched from tla.
tried to clean up "__all__" in a way that makes epydoc still work.

added lots more documentation, and renamed many methods and vars to hide
them as private non-exported API.

Transport's ModulusPack is now a static member, so it only has to be loaded
once, and can then be used by any future Transport object.

added Transport.connect(), which tries to wrap all the SSH2 negotiation and
authentication into one method.  you should be able to create a Transport,
call connect(), and then create channels.
2003-12-30 07:18:20 +00:00
Robey Pointer 36d6d95dc6 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-16]
hook up server-side kex-gex; add more documentation
group-exchange kex should work now on the server side.  it will only be
advertised if a "moduli" file has been loaded (see the -gasp- docs) so we
don't spend hours (literally. hours.) computing primes.  some of the logic
was previously wrong, too, since it had never been tested.

fixed repr() string for Transport/BaseTransport.  moved is_authenticated to
Transport where it belongs.

added lots of documentation (but still only about 10% documented).  lots of
methods were made private finally.
2003-12-28 03:20:42 +00:00
Robey Pointer 11815d4d83 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-9]
rename secsh -> paramiko
also, rename SecshException back to SSHException.  sigh. :)
2003-11-10 08:49:50 +00:00
Robey Pointer aad7b859f1 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-7]
cleaned up server code, renamed some files & classes
renamed demo-server.py and demo-host-key to demo_server.py and
demo_host_key, just to be consistent.

renamed SSHException -> SecshException.

generalized the mechanism where Channel decides whether to allow
different channel requests: 4 of the main ones (pty, window-change,
shell, and subsystem) go through easily override-able methods now.
you could probably make an actual ssh shell server.

gave ChannelFile a repr().

turned off ultra debugging in the demos.  demo_server creates a
subclass of Channel to allow pty/shell and sets an event when the
shell request is made, so that it knows when it can start sending
the fake bbs.

renamed to charmander and updated some of the distutils files.
2003-11-10 04:54:02 +00:00
Robey Pointer 5a48714394 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-5]
big chunk of work which makes server code 95% done
fixed auth check methods to return just a result (failed, succeeded,
partially succeeded) and always use get_allowed_auths to determine the
list of allowed auth methods to return.

channel's internal API changed a bit to allow for client-side vs.
server-side channels.  we now honor the "want-reply" bit from channel
requests.  in server mode (for now), we automatically allow pty-req
and shell requests without doing anything.

ChannelFile was fixed up a bit to support universal newlines.  readline
got rewritten: the old way used the "greedy" read call from ChannelFile,
which won't work if the socket doesn't have that much data buffered and
ready.  now it uses recv directly, and tracks the different newlines.

demo-server.py now answers to a single shell request (like a CLI ssh
tool will make) and does a very simple demo pretending to be a BBS.

transport: fixed a bug with parsing the remote side's banner.  channel
requests are passed to another method in server mode, to determine if
we should allow it.  new allowed channels are added to an accept queue,
and a new method 'accept' (with timeout) will block until the next
incoming channel is ready.
2003-11-09 21:14:21 +00:00
Robey Pointer 51607386c7 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--base-0]
initial import

(automatically generated log message)
2003-11-04 08:34:24 +00:00